File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11plugins {
22 id ' com.android.library'
33 id ' kotlin-android'
4+ id ' maven-publish'
45}
5- apply plugin : ' kotlin-android'
66
77android {
88 compileSdk 31
@@ -31,6 +31,22 @@ android {
3131 }
3232}
3333
34+ task androidSourcesJar (type : Jar ) {
35+ classifier ' sources'
36+ from android. sourceSets. main. java. srcDirs
37+ }
38+
39+ project. afterEvaluate {
40+ publishing {
41+ publications {
42+ release(MavenPublication ) {
43+ from components. release
44+ artifact androidSourcesJar
45+ }
46+ }
47+ }
48+ }
49+
3450dependencies {
3551 implementation ' androidx.appcompat:appcompat:1.4.0'
3652 implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3'
Original file line number Diff line number Diff line change 1+ jdk :
2+ - openjdk11
3+
4+ install :
5+ - ./gradlew assemble :SectorProgressBarLib:publishToMavenLocal
You can’t perform that action at this time.
0 commit comments