11apply plugin : ' com.android.library'
22apply plugin : ' kotlin-android'
3- ext {
4- PUBLISH_GROUP_ID = ' com.infideap.blockedittext'
5- PUBLISH_ARTIFACT_ID = ' block-edittext'
6- PUBLISH_VERSION = ' 0.1.2'
7- }
3+ apply plugin : ' maven-publish'
84android {
95 compileSdkVersion 30
106
@@ -27,7 +23,34 @@ android {
2723 }
2824
2925}
26+ afterEvaluate {
27+ def publish_groupId = ' com.infideap.blockedittext'
28+ def publish_artifactId = ' block-edittext'
29+ def publish_version = ' 0.2.2'
30+ publishing {
31+ publications {
32+ // Creates a Maven publication called "release".
33+ release(MavenPublication ) {
34+ // Applies the component for the release build variant.
35+ from components. release
36+
37+ // You can then customize attributes of the publication as shown below.
38+ groupId = publish_groupId
39+ artifactId = publish_artifactId
40+ version = publish_version
41+ }
42+ // Creates a Maven publication called “debug”.
43+ debug(MavenPublication ) {
44+ // Applies the component for the debug build variant.
45+ from components. debug
3046
47+ groupId = publish_groupId
48+ artifactId = publish_artifactId
49+ version = publish_version
50+ }
51+ }
52+ }
53+ }
3154dependencies {
3255 implementation fileTree(dir : ' libs' , include : [' *.jar' ])
3356
@@ -45,8 +68,6 @@ dependencies {
4568 implementation " androidx.core:core-ktx:1.3.2"
4669 implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
4770}
48- apply from : ' https://raw.githubusercontent.com/blundell/release-android-library/' +
49- ' master/android-release-aar.gradle'
5071repositories {
5172 mavenCentral()
5273}
0 commit comments