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