Skip to content

Commit

Permalink
[Modify] Change way to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
namnh-0652 committed Feb 24, 2023
1 parent fbea12a commit e4d4c75
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 40 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
}

dependencies {
implementation 'com.github.namnh-0652.MultipleJitPackLibs:core:1.0.1'
implementation 'com.github.namnh-0652.MultipleJitPackLibs:core:1.0.2'
implementation 'com.github.namnh-0652.MultipleJitPackLibs:attention:1.0.1'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
Expand Down
19 changes: 4 additions & 15 deletions attention/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id 'maven-publish'
}
apply from: '../version.gradle'
group = libGroupId
group = findProperty('groupId')

android {
namespace 'com.namnh.libtest.attention'
Expand All @@ -13,8 +13,8 @@ android {
defaultConfig {
minSdk 23
targetSdk 33
versionName attentionVersionName
versionCode attentionVersionCode
versionName = findProperty('versionName')
versionCode = findProperty('versionCode')

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down Expand Up @@ -45,15 +45,4 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = libGroupId
artifactId = 'attention'
version = attentionVersionName
}
}
}
}
with jitpackPublisher
4 changes: 4 additions & 0 deletions attention/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
groupId=com.github.namnh-0652.MultipleJitPackLibs
artifactId=attention
versionName=1.0.3
versionCode=1
19 changes: 4 additions & 15 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id 'maven-publish'
}
apply from: '../version.gradle'
group = libGroupId
group = findProperty('groupId')

android {
namespace 'com.namnh.libtest.core'
Expand All @@ -13,8 +13,8 @@ android {
defaultConfig {
minSdk 23
targetSdk 33
versionName coreVersionName
versionCode coreVersionCode
versionName = findProperty('versionName')
versionCode = findProperty('versionCode')

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down Expand Up @@ -45,15 +45,4 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = libGroupId
artifactId = 'core'
version = coreVersionName
}
}
}
}
with jitpackPublisher
4 changes: 4 additions & 0 deletions core/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
groupId=com.github.namnh-0652.MultipleJitPackLibs
artifactId=core
versionName=1.0.3
versionCode=1
23 changes: 14 additions & 9 deletions version.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
ext {
coreVersionName = "1.0.2"
coreVersionCode = 1

attentionVersionName = "1.0.1"
attentionVersionCode = 1

libGroupId = 'com.github.namnh-0652.MultipleJitPackLibs'
}
ext.jitpackPublisher = {
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = findProperty('groupId')
artifactId = findProperty('artifactId')
version = findProperty('versionName')
}
}
}
}
}

0 comments on commit e4d4c75

Please sign in to comment.