Skip to content

Commit 6f4e6ea

Browse files
committed
Fix maven-publish
I hope this one works
1 parent 75dcb57 commit 6f4e6ea

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

ael_kt/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ android {
6060
useLegacyPackaging = false
6161
}
6262
}
63+
publishing {
64+
singleVariant("release") {
65+
withSourcesJar()
66+
}
67+
}
6368
}
6469
dependencies {
6570
implementation("androidx.appcompat:appcompat:1.7.0")

ael_lite/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,9 @@ android {
5353
useLegacyPackaging = false
5454
}
5555
}
56+
publishing {
57+
singleVariant("release") {
58+
withSourcesJar()
59+
}
60+
}
5661
}

build.gradle.kts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,31 @@ plugins {
66
//auto suffixed with .gradle.plugin
77
id("com.android.application") version "8.7.2" apply false
88
id("com.android.library") version "8.7.2" apply false
9+
id("maven-publish")
910
kotlin("android") version "2.1.0" apply false // kotlin("android") == "org.jetbrains.kotlin.android"
1011
}
1112
tasks.withType(JavaCompile::class.java){
1213
options.compilerArgs.add("-Xlint:all")
1314
}
1415
tasks.register("clean",Delete::class){
1516
delete(rootProject.layout.buildDirectory)
17+
}
18+
subprojects {
19+
afterEvaluate {
20+
if (plugins.hasPlugin("com.android.library")){
21+
apply(plugin = "maven-publish")
22+
publishing {
23+
publications {
24+
register<MavenPublication>("ael") {
25+
afterEvaluate {
26+
from(components["release"])
27+
}
28+
groupId = "com.github.mdp43140"
29+
artifactId = project.name
30+
version = "1.0.0"
31+
}
32+
}
33+
}
34+
}
35+
}
1636
}

0 commit comments

Comments
 (0)