Skip to content

Commit

Permalink
[*] refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nisrulz committed Nov 5, 2016
1 parent 7e57a04 commit 7490788
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 57 deletions.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,19 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}

ext {
//Other
supportLibVersion = '25.0.0'

// Lib info
libVersionCode = 4
libVersionName = '1.0.3'
libPomUrl = 'https://github.com/nisrulz/stackedhorizontalprogressbar'
libGithubRepo = 'nisrulz/stackedhorizontalprogressbar'


libModuleName = 'stackedhorizontalprogressbar'
libModuleDesc = 'Android library to implement stacked horizontal progressbar'
libBintrayName = 'com.github.nisrulz:stackedhorizontalprogressbar'
}
4 changes: 2 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "24.0.3"
buildToolsVersion "25.0.0"

defaultConfig {
applicationId "github.nisrulz.stackedhorizontalprogressbarproject"
Expand All @@ -38,6 +38,6 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.0'
compile "com.android.support:appcompat-v7:$rootProject.ext.supportLibVersion"
compile project(':stackedhorizontalprogressbar')
}
58 changes: 3 additions & 55 deletions stackedhorizontalprogressbar/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright (C) 2016 Nishant Srivastava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply plugin: 'com.android.library'

android {
Expand All @@ -23,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 9
targetSdkVersion 25
versionCode 4
versionName VERSION_NAME
versionCode rootProject.ext.libVersionCode
versionName rootProject.ext.libVersionName
consumerProguardFiles 'consumer-proguard-rules.pro'
}
buildTypes {
Expand All @@ -40,40 +24,4 @@ dependencies {
testCompile 'junit:junit:4.12'
}



// Bintray info
def LIB_MODULE_NAME = 'stackedhorizontalprogressbar'
def LIB_MODULE_DESC = 'Android library to implement stacked horizontal progressbar'
def GITHUB_LINK = "https://github.com/nisrulz/stackedhorizontalprogressbar"
def GITHUB_REPO = "nisrulz/stackedhorizontalprogressbar"

ext {
bintrayRepo = 'maven'
bintrayName = 'com.github.nisrulz:stackedhorizontalprogressbar'

publishedGroupId = GROUP
libraryName = LIB_MODULE_NAME
artifact = LIB_MODULE_NAME // Has to be same as your library module name

libraryDescription = LIB_MODULE_DESC

// Your github repo link
siteUrl = GITHUB_LINK
gitUrl = GITHUB_LINK + ".git"
githubRepository = GITHUB_REPO

libraryVersion = VERSION_NAME

developerId = POM_DEVELOPER_ID
developerName = POM_DEVELOPER_NAME
developerEmail = POM_DEVELOPER_EMAILID

licenseName = POM_LICENCE_NAME
licenseUrl = POM_LICENCE_URL
allLicenses = [POM_ALL_LICENCES]
}

// Place it at the end of the file
apply from: 'https://raw.githubusercontent.com/nisrulz/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nisrulz/JCenter/master/bintrayv1.gradle'
apply from: 'https://raw.githubusercontent.com/nisrulz/JCenter/master/nishant-config.gradle'

0 comments on commit 7490788

Please sign in to comment.