11apply plugin : ' com.android.library'
22apply plugin : ' kotlin-android-extensions'
33apply 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
68final String CONFIG_TYPE_BOOLEAN = ' boolean'
@@ -16,11 +18,30 @@ final String CONFIG_TYPE_STRING = 'String'
1618final String CONFIG_LOGGING_ENABLED = ' LOGGING_ENABLED'
1719
1820group " $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
2647android {
@@ -30,7 +51,7 @@ android {
3051 minSdkVersion sdkMinVersion
3152 targetSdkVersion sdkTargetVersion
3253 versionCode 1
33- versionName " $r ootProject . 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+
0 commit comments