Skip to content

Commit

Permalink
Cleanup of gradle configuration and updating dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
techyourchance committed Aug 15, 2018
1 parent fe01092 commit 490589d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ buildscript {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
}
}
Expand All @@ -23,6 +24,14 @@ allprojects {
}
}

ext {
compileSdkVersion = 27
buildToolsVersion = "27.0.3"
supportLibVersion = "27.1.1"
junitVersion = "4.12"
mockitoVersion = "2.18.3"
}


task clean(type: Delete) {
delete rootProject.buildDir
Expand Down
15 changes: 8 additions & 7 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
applicationId "com.techyourchance.threadposters"
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -23,8 +24,8 @@ dependencies {
implementation project(path: ':threadposter')
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support:appcompat-v7:27.1.1'
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

testImplementation 'junit:junit:4.12'
testImplementation "org.mockito:mockito-core:2.12.0"
testImplementation "junit:junit:${rootProject.ext.junitVersion}"
testImplementation "org.mockito:mockito-core:${rootProject.ext.mockitoVersion}"
}
13 changes: 7 additions & 6 deletions threadposter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ ext {
}

android {
compileSdkVersion 27
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion "27.0.3"

defaultConfig {
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 28
versionCode 2
versionName "0.8.0"
}
Expand All @@ -48,12 +48,13 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
testImplementation "org.mockito:mockito-core:2.12.0"
testImplementation "junit:junit:${rootProject.ext.junitVersion}"
testImplementation "org.mockito:mockito-core:${rootProject.ext.mockitoVersion}"
}

//Add these lines to publish library to bintray. This is the readymade scripts made by github user nuuneoi to make uploading to bintray easy.
//Place it at the end of the file
// Add these lines to publish library to bintray.
// This is the readymade scripts made by github user nuuneoi to make uploading to bintray easy.
// Place it at the end of the file
if (project.rootProject.file('local.properties').exists()) {
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
Expand Down

0 comments on commit 490589d

Please sign in to comment.