Skip to content

Commit a752e28

Browse files
fix: add publish script to Gradle
1 parent 6490280 commit a752e28

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@ buildscript {
66
mavenCentral()
77
}
88
dependencies {
9+
if (System.getenv("SHOULD_PUBLISH") == "true") {
10+
classpath("io.github.gradle-nexus:publish-plugin:1.1.0")
11+
}
912
classpath 'com.android.tools.build:gradle:8.7.3'
1013
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1114
classpath "org.jacoco:org.jacoco.core:$jacocoVersion"
1215
}
1316
}
1417

18+
if (System.getenv("SHOULD_PUBLISH") == "true") {
19+
apply plugin: "io.github.gradle-nexus.publish-plugin"
20+
apply from: file("./scripts/publish-root.gradle")
21+
}
22+
1523
apply plugin: "com.android.library"
1624
apply plugin: "kotlin-android"
1725
apply plugin: "jacoco"
@@ -96,3 +104,7 @@ dependencies {
96104
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
97105
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
98106
}
107+
108+
if (System.getenv("SHOULD_PUBLISH") == "true") {
109+
apply from: file("./scripts/publish-module.gradle")
110+
}

0 commit comments

Comments
 (0)