Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 18683ef

Browse files
author
Pavel Skala
committed
Update version and globalize publishing properties
1 parent cd9a9df commit 18683ef

6 files changed

Lines changed: 32 additions & 78 deletions

File tree

firebase-fetcher/build.gradle

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
defaultConfig {
88
minSdkVersion 15
99
targetSdkVersion 27
10-
versionCode 1
11-
versionName "1.0"
10+
versionCode properties['VERSION_CODE']
11+
versionName properties['VERSION_NAME']
1212
}
1313
buildTypes {
1414
release {
@@ -25,27 +25,11 @@ dependencies {
2525
}
2626

2727
ext {
28-
bintrayRepo = 'version-update-handler'
2928
bintrayName = 'firebase-fetcher'
30-
bintrayOrganisation = 'ackeecz'
31-
32-
publishedGroupId = 'cz.ackee.updatechecker'
3329
publishedArtifactId = 'firebase-fetcher'
3430

3531
libraryName = 'Firebase Fetcher'
3632
libraryDescription = 'Fetches current version information from Firebase Remote Config'
37-
libraryVersion = '1.0.1'
38-
39-
siteUrl = 'https://github.com/AckeeCZ/version-update-handler'
40-
gitUrl = 'https://github.com/AckeeCZ/version-update-handler.git'
41-
42-
developerId = 'ackee'
43-
developerName = 'Ackee'
44-
developerEmail = '[email protected]'
45-
46-
licenseName = 'The Apache Software License, Version 2.0'
47-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
48-
allLicenses = ["Apache-2.0"]
4933
}
5034

5135
apply from: rootProject.file('gradle/bintray/install.gradle')

gradle.properties

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ org.gradle.jvmargs=-Xmx1536m
1111
# This option should only be used with decoupled projects. More details, visit
1212
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1313
# org.gradle.parallel=true
14-
VERSION_NAME=1.0.1
14+
VERSION_NAME=1.0.2
1515
VERSION_CODE=1
1616
GROUP=cz.ackee.updatechecker
17-
POM_DESCRIPTION=Fetcher for application version with resolving status
18-
POM_URL=
17+
BINTRAY_REPO=version-update-handler
18+
BINTRAY_ORGANISATION=ackeecz
19+
SITE_URL=https://github.com/AckeeCZ/version-update-handler
20+
GIT_URL=https://github.com/AckeeCZ/version-update-handler.git
21+
POM_DEVELOPER_ID=ackee
22+
POM_DEVELOPER_NAME=Ackee
23+
POM_DEVELOPER_EMAIL=[email protected]
1924
POM_LICENCE_NAME=The Apache Software License, Version 2.0
2025
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
21-
POM_LICENCE_DIST=repo
22-
POM_DEVELOPER_ID=davidbilik
23-
POM_DEVELOPER_NAME=David Bilik

gradle/bintray/bintray.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.jfrog.bintray'
22

3-
version = libraryVersion
3+
version = project.property("VERSION_NAME")
44

55
if (project.hasProperty("android")) { // Android libraries
66
task sourcesJar(type: Jar) {
@@ -40,18 +40,18 @@ bintray {
4040

4141
configurations = ['archives']
4242
pkg {
43-
repo = bintrayRepo
4443
name = bintrayName
45-
userOrg = bintrayOrganisation
44+
repo = project.property("BINTRAY_REPO")
45+
userOrg = project.property("BINTRAY_ORGANISATION")
4646
desc = libraryDescription
47-
websiteUrl = siteUrl
48-
vcsUrl = gitUrl
49-
licenses = allLicenses
47+
websiteUrl = project.property("SITE_URL")
48+
vcsUrl = project.property("GIT_URL")
49+
licenses = ["Apache-2.0"]
5050
publish = true
5151
publicDownloadNumbers = true
5252
version {
5353
desc = libraryDescription
54-
name = libraryVersion
54+
name = project.property("VERSION_NAME")
5555
released = new Date()
5656

5757
gpg {

gradle/bintray/install.gradle

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
apply plugin: 'com.github.dcendents.android-maven'
22

3-
group = publishedGroupId
3+
group = project.property("GROUP")
44

55
install {
66
repositories.mavenInstaller {
77
// This generates POM.xml with proper parameters
88
pom {
99
project {
1010
packaging 'aar'
11-
groupId publishedGroupId
11+
groupId project.property("GROUP")
1212
artifactId publishedArtifactId
1313

1414
name libraryName
1515
description libraryDescription
16-
url siteUrl
16+
url project.property("SITE_URL")
1717

1818
licenses {
1919
license {
20-
name licenseName
21-
url licenseUrl
20+
name project.property("POM_LICENCE_NAME")
21+
url project.property("POM_LICENCE_URL")
2222
}
2323
}
2424
developers {
2525
developer {
26-
id developerId
27-
name developerName
28-
email developerEmail
26+
id project.property("POM_DEVELOPER_ID")
27+
name project.property("POM_DEVELOPER_NAME")
28+
email project.property("POM_DEVELOPER_EMAIL")
2929
}
3030
}
3131
scm {
32-
connection gitUrl
33-
developerConnection gitUrl
34-
url siteUrl
32+
connection project.property("GIT_URL")
33+
developerConnection project.property("GIT_URL")
34+
url project.property("SITE_URL")
3535
}
3636
}
3737
}

library/build.gradle

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
defaultConfig {
88
minSdkVersion 15
99
targetSdkVersion 27
10-
versionCode 1
11-
versionName "1.0"
10+
versionCode properties['VERSION_CODE']
11+
versionName properties['VERSION_NAME']
1212

1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1414

@@ -32,27 +32,11 @@ dependencies {
3232
}
3333

3434
ext {
35-
bintrayRepo = 'version-update-handler'
3635
bintrayName = 'status-resolver'
37-
bintrayOrganisation = 'ackeecz'
38-
39-
publishedGroupId = 'cz.ackee.updatechecker'
4036
publishedArtifactId = 'status-resolver'
4137

4238
libraryName = 'Version Status Resolver'
4339
libraryDescription = 'Compares current application version number to the versions that are stored in remote locations and show the dialog to the user with prompt to update their app'
44-
libraryVersion = '1.0.1'
45-
46-
siteUrl = 'https://github.com/AckeeCZ/version-update-handler'
47-
gitUrl = 'https://github.com/AckeeCZ/version-update-handler.git'
48-
49-
developerId = 'ackee'
50-
developerName = 'Ackee'
51-
developerEmail = '[email protected]'
52-
53-
licenseName = 'The Apache Software License, Version 2.0'
54-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
55-
allLicenses = ["Apache-2.0"]
5640
}
5741

5842
apply from: rootProject.file('gradle/bintray/install.gradle')

rest-fetcher/build.gradle

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
defaultConfig {
88
minSdkVersion 15
99
targetSdkVersion 27
10-
versionCode 1
11-
versionName "1.0"
10+
versionCode properties['VERSION_CODE']
11+
versionName properties['VERSION_NAME']
1212

1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1414

@@ -32,27 +32,11 @@ dependencies {
3232
}
3333

3434
ext {
35-
bintrayRepo = 'version-update-handler'
3635
bintrayName = 'rest-fetcher'
37-
bintrayOrganisation = 'ackeecz'
38-
39-
publishedGroupId = 'cz.ackee.updatechecker'
4036
publishedArtifactId = 'rest-fetcher'
4137

4238
libraryName = 'Rest Fetcher'
4339
libraryDescription = 'Fetches current version information from remote API'
44-
libraryVersion = '1.0.1'
45-
46-
siteUrl = 'https://github.com/AckeeCZ/version-update-handler'
47-
gitUrl = 'https://github.com/AckeeCZ/version-update-handler.git'
48-
49-
developerId = 'ackee'
50-
developerName = 'Ackee'
51-
developerEmail = '[email protected]'
52-
53-
licenseName = 'The Apache Software License, Version 2.0'
54-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
55-
allLicenses = ["Apache-2.0"]
5640
}
5741

5842
apply from: rootProject.file('gradle/bintray/install.gradle')

0 commit comments

Comments
 (0)