Skip to content

Commit

Permalink
simplify gradle scripts, bump plugins & some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pazos committed Jan 11, 2020
1 parent cf018ba commit dcac0e9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 32 deletions.
27 changes: 16 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ apply plugin: 'kotlin-android-extensions'
android {
defaultConfig {
applicationId "org.koreader.launcher"
minSdkVersion rootProject.ext.minSdk
targetSdkVersion rootProject.ext.targetSdk
compileSdkVersion rootProject.ext.targetSdk
minSdkVersion minSdk
targetSdkVersion targetSdk
compileSdkVersion targetSdk
versionCode versCode as Integer
versionName versName
}
Expand Down Expand Up @@ -75,7 +75,7 @@ android {
checkReleaseBuilds true
abortOnError false

// reflection
// reflection (used for EPD updates)
disable 'PrivateApi'

// WRITE_SETTINGS permission
Expand All @@ -86,6 +86,7 @@ android {
// And requestLegacyExternalStorage, available on API 29
disable 'UnusedAttribute'

// EPDTestActivity has strings hardcoded in english
disable 'SetTextI18n'
}

Expand All @@ -100,13 +101,17 @@ android {
}
}

dependencies {
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.1'
}

repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
implementation "androidx.core:core-ktx:$androidx_core_version"
implementation "androidx.legacy:legacy-support-v4:$androidx_supportv4_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_plugin_version"

// add Leak Canary on debug variants.
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.1'
}
31 changes: 12 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
buildscript {
ext.kotlin_version = '1.3.31'
repositories {
google()
jcenter()

}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
ext.gradle_plugin_version = '3.5.3'
ext.kotlin_plugin_version = '1.3.50'
ext.androidx_core_version = '1.1.0'
ext.androidx_supportv4_version = '1.0.0'
ext.minSdk = 14
ext.safSdk = 19
ext.targetSdk = 28
ext.latestSdk = 29

allprojects {
repositories {
google()
jcenter()
}
}

ext {
minSdk = 14
safSdk = 19
targetSdk = 28
latestSdk = 29
dependencies {
classpath "com.android.tools.build:gradle:$gradle_plugin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_plugin_version"
}
}


task clean(type: Delete) {
delete rootProject.buildDir
}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jun 22 02:03:23 CEST 2019
#Thu Jan 09 00:29:09 CET 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 comments on commit dcac0e9

Please sign in to comment.