From 30125cf405bb45b523de9dde818471402f16b664 Mon Sep 17 00:00:00 2001 From: namnh-0652 Date: Thu, 23 Feb 2023 17:55:23 +0700 Subject: [PATCH] [Fix] Correct publishing task --- attention/build.gradle | 18 ++++++++++++++++-- core/build.gradle | 20 +++++++++++++++++--- jitpack.yml | 2 ++ version.gradle | 4 ++-- 4 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 jitpack.yml diff --git a/attention/build.gradle b/attention/build.gradle index 48f7714..018f84f 100644 --- a/attention/build.gradle +++ b/attention/build.gradle @@ -1,9 +1,10 @@ plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' + id 'maven-publish' } apply from: '../version.gradle' -group=project.ext.libGroupName +group=project.ext.libGroupId android { namespace 'com.namnh.libtest.attention' @@ -42,4 +43,17 @@ dependencies { testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} \ No newline at end of file +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + groupId = project.ext.libGroupId + artifactId = 'attention' + version = project.ext.versionName + } + } + } +} diff --git a/core/build.gradle b/core/build.gradle index 3958968..3fdb1d5 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,9 +1,10 @@ plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' + id 'maven-publish' } apply from: '../version.gradle' -group=project.ext.libGroupName +group=project.ext.libGroupId android { namespace 'com.namnh.libtest.core' @@ -36,10 +37,23 @@ android { dependencies { - implementation 'androidx.core:core-ktx:1.7.0' + implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.8.0' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} \ No newline at end of file +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + groupId = project.ext.libGroupId + artifactId = 'core' + version = project.ext.versionName + } + } + } +} diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..adb3fe1 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +jdk: + - openjdk11 diff --git a/version.gradle b/version.gradle index 546d6e8..2c34e34 100644 --- a/version.gradle +++ b/version.gradle @@ -1,5 +1,5 @@ ext { - versionName = "1.0.0" + versionName = "1.0.1" versionCode = 1 - libGroupName = 'com.github.namnh-0652.MultipleJitPackLibs' + libGroupId = 'com.github.namnh-0652.MultipleJitPackLibs' } \ No newline at end of file