Skip to content

Commit 215923a

Browse files
committed
lint code
1 parent 99f56ed commit 215923a

File tree

3 files changed

+27
-234
lines changed

3 files changed

+27
-234
lines changed

build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ repositories {
1212
}
1313
}
1414

15+
16+
1517
dependencies {
1618
testImplementation(kotlin("test"))
1719
}

xap-sdk/build.gradle.kts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,28 @@ publishing {
103103
}
104104
}
105105
}
106+
107+
gradle.taskGraph.whenReady {
108+
if (hasTask(":publishSnapshots")) {
109+
rootProject.version = "1.0.0-SNAPSHOT"
110+
println("📌 Setting root project version to 1.0.0-SNAPSHOT for publishSnapshots task")
111+
}
112+
}
113+
114+
tasks.register("publishSnapshots") {
115+
val snapshotModules = rootProject.subprojects.filter { project ->
116+
project.version.toString().contains("-SNAPSHOT") && project.tasks.names.contains("publish")
117+
}
118+
119+
if (snapshotModules.isNotEmpty()) {
120+
dependsOn(snapshotModules.map { ":${it.name}:publish" })
121+
}
122+
123+
doLast {
124+
if (snapshotModules.isEmpty()) {
125+
println("❌ No snapshot modules to publish.")
126+
} else {
127+
println("📦 Successfully published snapshots for: ${snapshotModules.map { it.name }}")
128+
}
129+
}
130+
}

xap-sdk/gradlew

Lines changed: 0 additions & 234 deletions
This file was deleted.

0 commit comments

Comments
 (0)