Skip to content

Commit dbb516f

Browse files
committed
Configure upload artifacts to bintray
1 parent 3519ad8 commit dbb516f

File tree

6 files changed

+152
-21
lines changed

6 files changed

+152
-21
lines changed

barcode/build.gradle

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android-extensions'
33
apply plugin: 'kotlin-android'
4+
apply plugin: 'com.jfrog.bintray'
5+
apply plugin: 'com.github.dcendents.android-maven'
46

57
// Build config types set by the variants
68
final String CONFIG_TYPE_BOOLEAN = 'boolean'
@@ -16,11 +18,30 @@ final String CONFIG_TYPE_STRING = 'String'
1618
final String CONFIG_LOGGING_ENABLED = 'LOGGING_ENABLED'
1719

1820
group "$rootProject.ext.coreGroupId"
21+
version = "$rootProject.ext.coreVersion"
22+
23+
ext {
24+
artifact = project.name
25+
libraryDescription = 'Barcode Module'
26+
27+
bintrayRepo = "$rootProject.ext.binTrayRepo"
28+
bintrayName = "$rootProject.ext.binTrayName"
29+
publishedGroupId = "$rootProject.ext.coreGroupId"
30+
libraryName = "$rootProject.ext.libraryName"
31+
32+
libraryVersion = "$rootProject.ext.coreVersion"
33+
34+
siteUrl = "$rootProject.ext.siteUrl"
35+
gitUrl = "$rootProject.ext.gitUrl"
36+
37+
developerId = "$rootProject.ext.developerId"
38+
developerName = "$rootProject.ext.developerName"
39+
developerEmail = "$rootProject.ext.developerEmail"
40+
41+
licenseName = "$rootProject.ext.licenseName"
42+
licenseUrl = "$rootProject.ext.licenseUrl"
43+
allLicenses = "$rootProject.ext.allLicenses"
1944

20-
uploadArchives {
21-
repositories {
22-
mavenLocal()
23-
}
2445
}
2546

2647
android {
@@ -30,7 +51,7 @@ android {
3051
minSdkVersion sdkMinVersion
3152
targetSdkVersion sdkTargetVersion
3253
versionCode 1
33-
versionName "$rootProject.ext.coreVersion"
54+
versionName version
3455

3556
consumerProguardFiles 'proguard-rules.pro'
3657

@@ -82,3 +103,10 @@ dependencies {
82103
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.ext.kotlinVersion"
83104
}
84105

106+
//Add these lines to publish library to bintray. This is the readymade scripts made by github user nuuneoi to make uploading to bintray easy.
107+
//Place it at the end of the file
108+
if (project.rootProject.file('local.properties').exists()) {
109+
apply from: 'https://raw.githubusercontent.com/wajahatkarim3/JCenter-Gradle-Scripts/master/install.gradle'
110+
apply from: 'https://raw.githubusercontent.com/wajahatkarim3/JCenter-Gradle-Scripts/master/bintray.gradle'
111+
}
112+

build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ buildscript {
77
sdkMinVersion = 17
88
sdkTargetVersion = 28
99
buildTools = '28.0.3'
10+
1011
}
1112
repositories {
1213
jcenter()
@@ -17,14 +18,16 @@ buildscript {
1718
classpath 'com.android.tools.build:gradle:3.3.2'
1819
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$rootProject.ext.kotlinVersion"
1920

21+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
22+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
23+
2024
// NOTE: Do not place your application dependencies here; they belong
2125
// in the individual module build.gradle files
2226
}
2327
}
2428

2529
allprojects {
2630
repositories {
27-
mavenLocal()
2831
jcenter()
2932
google()
3033
mavenCentral()
@@ -44,3 +47,7 @@ gradle.projectsEvaluated {
4447
options.compilerArgs << "-Xmaxerrs" << "1000" // or whatever number you want
4548
}
4649
}
50+
51+
subprojects {
52+
tasks.withType(Javadoc).all { enabled = false }
53+
}

dependencies.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ ext {
33

44
coreGroupId = 'com.botnerd.core'
55

6+
binTrayRepo = 'android-core'
7+
binTrayName = 'com.botnerd.core'
8+
libraryName = 'android-core'
9+
10+
siteUrl = 'https://github.com/botnerd/android-core'
11+
gitUrl = 'https://github.com/botnerd/android-core.git'
12+
13+
developerId = 'botnerd'
14+
developerName = 'Tim Judkins'
15+
developerEmail = '[email protected]'
16+
17+
licenseName = 'The Apache Software License, Version 2.0'
18+
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
19+
allLicenses = ["Apache-2.0"]
20+
621
googleServicesVersion = '4.2.0'
722

823
kotlinVersion = '1.3.21'

network/build.gradle

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,30 @@ final String CONFIG_TYPE_STRING = 'String'
1616
final String CONFIG_LOGGING_ENABLED = 'LOGGING_ENABLED'
1717

1818
group "$rootProject.ext.coreGroupId"
19+
version = "$rootProject.ext.coreVersion"
20+
21+
ext {
22+
artifact = project.name
23+
libraryDescription = 'Network Module'
24+
25+
bintrayRepo = "$rootProject.ext.binTrayRepo"
26+
bintrayName = "$rootProject.ext.binTrayName"
27+
publishedGroupId = "$rootProject.ext.coreGroupId"
28+
libraryName = "$rootProject.ext.libraryName"
29+
30+
libraryVersion = "$rootProject.ext.coreVersion"
31+
32+
siteUrl = "$rootProject.ext.siteUrl"
33+
gitUrl = "$rootProject.ext.gitUrl"
34+
35+
developerId = "$rootProject.ext.developerId"
36+
developerName = "$rootProject.ext.developerName"
37+
developerEmail = "$rootProject.ext.developerEmail"
38+
39+
licenseName = "$rootProject.ext.licenseName"
40+
licenseUrl = "$rootProject.ext.licenseUrl"
41+
allLicenses = "$rootProject.ext.allLicenses"
1942

20-
uploadArchives {
21-
repositories {
22-
mavenLocal()
23-
}
2443
}
2544

2645
android {
@@ -30,7 +49,7 @@ android {
3049
minSdkVersion sdkMinVersion
3150
targetSdkVersion sdkTargetVersion
3251
versionCode 1
33-
versionName "$rootProject.ext.coreVersion"
52+
versionName version
3453

3554
consumerProguardFiles 'proguard-rules.pro'
3655

@@ -88,3 +107,11 @@ dependencies {
88107
configurations.all() {
89108
resolutionStrategy.force "com.squareup.okio:okio:$rootProject.ext.okioVersion"
90109
}
110+
111+
//Add these lines to publish library to bintray. This is the readymade scripts made by github user nuuneoi to make uploading to bintray easy.
112+
//Place it at the end of the file
113+
if (project.rootProject.file('local.properties').exists()) {
114+
apply from: 'https://raw.githubusercontent.com/wajahatkarim3/JCenter-Gradle-Scripts/master/install.gradle'
115+
apply from: 'https://raw.githubusercontent.com/wajahatkarim3/JCenter-Gradle-Scripts/master/bintray.gradle'
116+
}
117+

ui/build.gradle

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,30 @@ final String CONFIG_TYPE_STRING = 'String'
1616
final String CONFIG_LOGGING_ENABLED = 'LOGGING_ENABLED'
1717

1818
group "$rootProject.ext.coreGroupId"
19+
version = "$rootProject.ext.coreVersion"
20+
21+
ext {
22+
artifact = project.name
23+
libraryDescription = 'UI Module'
24+
25+
bintrayRepo = "$rootProject.ext.binTrayRepo"
26+
bintrayName = "$rootProject.ext.binTrayName"
27+
publishedGroupId = "$rootProject.ext.coreGroupId"
28+
libraryName = "$rootProject.ext.libraryName"
29+
30+
libraryVersion = "$rootProject.ext.coreVersion"
31+
32+
siteUrl = "$rootProject.ext.siteUrl"
33+
gitUrl = "$rootProject.ext.gitUrl"
34+
35+
developerId = "$rootProject.ext.developerId"
36+
developerName = "$rootProject.ext.developerName"
37+
developerEmail = "$rootProject.ext.developerEmail"
38+
39+
licenseName = "$rootProject.ext.licenseName"
40+
licenseUrl = "$rootProject.ext.licenseUrl"
41+
allLicenses = "$rootProject.ext.allLicenses"
1942

20-
uploadArchives {
21-
repositories {
22-
mavenLocal()
23-
}
2443
}
2544

2645
android {
@@ -30,7 +49,7 @@ android {
3049
minSdkVersion sdkMinVersion
3150
targetSdkVersion sdkTargetVersion
3251
versionCode 1
33-
versionName "$rootProject.ext.coreVersion"
52+
versionName version
3453

3554
consumerProguardFiles 'proguard-rules.pro'
3655

@@ -93,3 +112,11 @@ configurations.all() {
93112
resolutionStrategy.force "androidx.media:media:$rootProject.ext.mediaLibVersion"
94113
resolutionStrategy.force "androidx.legacy:legacy-support-v4:$rootProject.ext.legacySupportLibVersion"
95114
}
115+
116+
//Add these lines to publish library to bintray. This is the readymade scripts made by github user nuuneoi to make uploading to bintray easy.
117+
//Place it at the end of the file
118+
if (project.rootProject.file('local.properties').exists()) {
119+
apply from: 'https://raw.githubusercontent.com/wajahatkarim3/JCenter-Gradle-Scripts/master/install.gradle'
120+
apply from: 'https://raw.githubusercontent.com/wajahatkarim3/JCenter-Gradle-Scripts/master/bintray.gradle'
121+
}
122+

util/build.gradle

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,30 @@ final String CONFIG_TYPE_STRING = 'String'
1616
final String CONFIG_LOGGING_ENABLED = 'LOGGING_ENABLED'
1717

1818
group "$rootProject.ext.coreGroupId"
19+
version = "$rootProject.ext.coreVersion"
20+
21+
ext {
22+
artifact = project.name
23+
libraryDescription = 'Util Module'
24+
25+
bintrayRepo = "$rootProject.ext.binTrayRepo"
26+
bintrayName = "$rootProject.ext.binTrayName"
27+
publishedGroupId = "$rootProject.ext.coreGroupId"
28+
libraryName = "$rootProject.ext.libraryName"
29+
30+
libraryVersion = "$rootProject.ext.coreVersion"
31+
32+
siteUrl = "$rootProject.ext.siteUrl"
33+
gitUrl = "$rootProject.ext.gitUrl"
34+
35+
developerId = "$rootProject.ext.developerId"
36+
developerName = "$rootProject.ext.developerName"
37+
developerEmail = "$rootProject.ext.developerEmail"
38+
39+
licenseName = "$rootProject.ext.licenseName"
40+
licenseUrl = "$rootProject.ext.licenseUrl"
41+
allLicenses = "$rootProject.ext.allLicenses"
1942

20-
uploadArchives {
21-
repositories {
22-
mavenLocal()
23-
}
2443
}
2544

2645
android {
@@ -30,7 +49,7 @@ android {
3049
minSdkVersion sdkMinVersion
3150
targetSdkVersion sdkTargetVersion
3251
versionCode 1
33-
versionName "$rootProject.ext.coreVersion"
52+
versionName version
3453

3554
consumerProguardFiles 'proguard-rules.pro'
3655

@@ -77,3 +96,11 @@ dependencies {
7796
androidTestImplementation "androidx.test.ext:junit:$rootProject.ext.androidTestVersion"
7897
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.ext.kotlinVersion"
7998
}
99+
100+
//Add these lines to publish library to bintray. This is the readymade scripts made by github user nuuneoi to make uploading to bintray easy.
101+
//Place it at the end of the file
102+
if (project.rootProject.file('local.properties').exists()) {
103+
apply from: 'https://raw.githubusercontent.com/wajahatkarim3/JCenter-Gradle-Scripts/master/install.gradle'
104+
apply from: 'https://raw.githubusercontent.com/wajahatkarim3/JCenter-Gradle-Scripts/master/bintray.gradle'
105+
}
106+

0 commit comments

Comments
 (0)