Skip to content

Commit 68169e1

Browse files
committed
feat: configure sub artifacts to depend on remote libs, and replace to local projects when debugging
1 parent 2439a2f commit 68169e1

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

build.gradle.kts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22

33
plugins {
4-
kotlin("jvm") version "1.3.21"
4+
kotlin("jvm") version "1.3.21" apply false
55
}
66

77
allprojects {
@@ -14,13 +14,23 @@ allprojects {
1414
repositories {
1515
maven(url = "http://maven.aliyun.com/nexus/content/groups/public/")
1616
maven(url = "https://maven.aliyun.com/repository/google")
17+
maven(url = "https://jitpack.io")
1718
}
1819

1920
tasks.withType<KotlinCompile>{
2021
kotlinOptions.jvmTarget = "1.8"
2122
}
2223
}
2324

24-
repositories {
25-
maven(url = "https://jitpack.io")
26-
}
25+
configurations.all {
26+
resolutionStrategy.dependencySubstitution.all {
27+
requested.let {
28+
if (it is ModuleComponentSelector && it.group == "com.github.zijing07.gsonkeepdefault") {
29+
val targetProject = findProject(":${it.module}")
30+
if (targetProject != null) {
31+
useTarget(targetProject)
32+
}
33+
}
34+
}
35+
}
36+
}

core/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ dependencies {
88
implementation(kotlin("stdlib"))
99

1010
kaptTest(project(":processor"))
11-
testImplementation(project(":processor"))
1211
testImplementation("junit", "junit", "4.12")
1312
}

processor/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,4 @@ dependencies {
1010
implementation("com.google.auto.service:auto-service:1.0-rc4")
1111
kapt("com.google.auto.service:auto-service:1.0-rc4")
1212
implementation("me.eugeniomarletti.kotlin.metadata:kotlin-metadata:1.4.0")
13-
14-
kaptTest(project(":processor"))
15-
testImplementation("junit", "junit", "4.12")
1613
}

0 commit comments

Comments
 (0)