Skip to content

Commit e51d1da

Browse files
author
sunwei
committed
refact
1 parent 643a2eb commit e51d1da

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

app/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,3 @@ dependencies {
3030
implementation 'androidx.appcompat:appcompat:1.3.1'
3131
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
3232
}
33-
repositories {
34-
mavenCentral()
35-
}

library/build.gradle

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
3+
apply plugin: 'maven-publish'
34

45
android {
56
compileSdkVersion 31
@@ -29,8 +30,27 @@ dependencies {
2930
compileOnly 'androidx.fragment:fragment:1.3.6'
3031
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
3132
implementation "androidx.exifinterface:exifinterface:1.3.2"
32-
implementation 'androidx.core:core-ktx:1.3.2'
33+
implementation 'androidx.core:core-ktx:1.6.0'
3334
implementation 'androidx.appcompat:appcompat:1.3.1'
35+
}
36+
37+
afterEvaluate {
38+
publishing {
39+
publications {
40+
// Creates a Maven publication called "release".
41+
release(MavenPublication) {
42+
// Applies the component for the release build variant.
43+
from components.release
3444

45+
// You can then customize attributes of the publication as shown below.
46+
groupId = 'com.sw926.imagefileselector'
47+
artifactId = 'library'
48+
version = '2.0.0'
3549

50+
repositories {
51+
mavenCentral()
52+
}
53+
}
54+
}
55+
}
3656
}

0 commit comments

Comments
 (0)