File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ android {
6060 useLegacyPackaging = false
6161 }
6262 }
63+ publishing {
64+ singleVariant(" release" ) {
65+ withSourcesJar()
66+ }
67+ }
6368}
6469dependencies {
6570 implementation(" androidx.appcompat:appcompat:1.7.0" )
Original file line number Diff line number Diff line change @@ -53,4 +53,9 @@ android {
5353 useLegacyPackaging = false
5454 }
5555 }
56+ publishing {
57+ singleVariant(" release" ) {
58+ withSourcesJar()
59+ }
60+ }
5661}
Original file line number Diff line number Diff 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}
1112tasks.withType(JavaCompile ::class .java){
1213 options.compilerArgs.add(" -Xlint:all" )
1314}
1415tasks.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}
You can’t perform that action at this time.
0 commit comments