File tree Expand file tree Collapse file tree 2 files changed +43
-1
lines changed Expand file tree Collapse file tree 2 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ plugins {
5
5
id ' org.jetbrains.kotlin.jvm'
6
6
}
7
7
8
+ apply from : rootProject. file(' gradle/utils/embedded.gradle' )
9
+
8
10
gradlePlugin {
9
11
website = ' https://github.com/ShikaSD/kotlin-object-serialization-fix'
10
12
vcsUrl = ' https://github.com/ShikaSD/kotlin-object-serialization-fix.git'
@@ -24,5 +26,5 @@ dependencies {
24
26
implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk8"
25
27
implementation " org.jetbrains.kotlin:kotlin-gradle-plugin-api"
26
28
27
- runtimeOnly( project(' :kotlin-plugin' ) )
29
+ embedded project(' :kotlin-plugin' )
28
30
}
Original file line number Diff line number Diff line change
1
+ configurations {
2
+ embedded {
3
+ transitive = false
4
+ }
5
+ compileOnly. extendsFrom(embedded)
6
+ }
7
+
8
+ def embeddedProjects () {
9
+ return project. configurations. findByName(' embedded' )
10
+ .resolvedConfiguration
11
+ .resolvedArtifacts
12
+ .findAll { it. id. componentIdentifier instanceof ProjectComponentIdentifier }
13
+ .collect { project(it. id. componentIdentifier. projectPath) }
14
+ }
15
+
16
+ afterEvaluate {
17
+ dependencies {
18
+ embeddedProjects(). collect { it. configurations. findByName(" published" ) }
19
+ .forEach {
20
+ it. dependencies. forEach {
21
+ runtime " $it . group :$it . name :$it . version "
22
+ }
23
+ }
24
+ }
25
+
26
+ jar {
27
+ from project. configurations. embedded. collect {
28
+ zipTree(it)
29
+ }
30
+ }
31
+
32
+ tasks. getByName(" sourcesJar" ) {
33
+ archiveClassifier = ' sources'
34
+ from embeddedProjects(). collect { it. sourceSets. main. allSource }
35
+ }
36
+
37
+ artifacts {
38
+ archives sourcesJar
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments