Skip to content

Commit 43a9903

Browse files
authored
Merge pull request GitLiveApp#11 from GitLiveApp/sign_on_publish_only
Sign on publish only
2 parents b330d8b + 7000c04 commit 43a9903

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

build.gradle.kts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ val targetSdkVersion by extra(28)
2323
val minSdkVersion by extra(14)
2424

2525

26-
2726
tasks {
2827
val downloadIOSFirebaseZipFile by creating(Download::class) {
2928
onlyIfModified(true)
@@ -37,7 +36,7 @@ tasks {
3736
dependsOn(downloadIOSFirebaseZipFile)
3837
from(zipTree(downloadIOSFirebaseZipFile.dest))
3938
into("$buildDir")
40-
outputs.upToDateWhen { File("$rootDir/$buildDir/Firebase").isDirectory }
39+
outputs.upToDateWhen { File("$buildDir/Firebase").isDirectory }
4140
}
4241

4342
}
@@ -46,13 +45,20 @@ subprojects {
4645

4746
group = "dev.gitlive"
4847

48+
4949
repositories {
5050
mavenLocal()
5151
mavenCentral()
5252
google()
5353
jcenter()
5454
}
5555

56+
var shouldSign = true
57+
58+
tasks.withType<Sign>().configureEach {
59+
onlyIf { shouldSign }
60+
}
61+
5662

5763
tasks {
5864

@@ -119,6 +125,10 @@ subprojects {
119125
tasks.getByPath("compileKotlinIos").dependsOn(rootProject.tasks.named("unzipIOSFirebase"))
120126
tasks.getByPath("compileKotlinIosArm64").dependsOn(rootProject.tasks.named("unzipIOSFirebase"))
121127

128+
tasks.named("publishToMavenLocal").configure {
129+
shouldSign = false
130+
}
131+
122132
dependencies {
123133
"commonMainImplementation"(kotlin("stdlib-common"))
124134
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.4")

firebase-app/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,3 @@ kotlin {
8585
signing {
8686
sign(publishing.publications)
8787
}
88-
89-
tasks.getByPath("compileKotlinIos").dependsOn(rootProject.tasks.named("unzipIOSFirebase"))
90-
tasks.getByPath("compileKotlinIosArm64").dependsOn(rootProject.tasks.named("unzipIOSFirebase"))

0 commit comments

Comments
 (0)