Skip to content

Commit

Permalink
[Fix] Correct publishing task
Browse files Browse the repository at this point in the history
  • Loading branch information
namnh-0652 committed Feb 23, 2023
1 parent 1bce94e commit 30125cf
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
18 changes: 16 additions & 2 deletions attention/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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'
}
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = project.ext.libGroupId
artifactId = 'attention'
version = project.ext.versionName
}
}
}
}
20 changes: 17 additions & 3 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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'
}
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = project.ext.libGroupId
artifactId = 'core'
version = project.ext.versionName
}
}
}
}
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jdk:
- openjdk11
4 changes: 2 additions & 2 deletions version.gradle
Original file line number Diff line number Diff line change
@@ -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'
}

0 comments on commit 30125cf

Please sign in to comment.