Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): refactor build scripts to use single version references #176

Merged
merged 3 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
compileSdkVersion = 30
targetSdkVersion = 30
minSdkVersion = 21
protobufVersion = "3.19.3"
appcompatVersion = "1.3.1"
androidxTestJunitVersion = "1.1.3"
sqliteVersion = "2.1.0"
}

repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
Expand All @@ -29,7 +33,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
8 changes: 4 additions & 4 deletions rsdroid-instrumented/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
compileSdkVersion rootProject.ext.compileSdkVersion

defaultConfig {
applicationId "net.ankiweb.rsdroid.instrumented"
minSdkVersion 21
targetSdkVersion 30
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"

Expand All @@ -49,7 +49,7 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation project(path: ':rsdroid')

androidTestImplementation 'androidx.sqlite:sqlite-framework:2.1.0'
androidTestImplementation "androidx.sqlite:sqlite-framework:${rootProject.ext.sqliteVersion}"

androidTestImplementation 'com.jakewharton.timber:timber:5.0.1'
}
8 changes: 4 additions & 4 deletions rsdroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def getAnkiCommitHash = { ->
}

android {
compileSdkVersion 30
compileSdkVersion rootProject.ext.compileSdkVersion
ndkVersion "22.0.7026061" // Used by GitHub actions - avoids an install step on some machines

compileOptions {
Expand All @@ -24,8 +24,8 @@ android {
}

defaultConfig {
minSdkVersion 21
targetSdkVersion 30
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName VERSION_NAME

Expand Down Expand Up @@ -61,7 +61,7 @@ dependencies {
implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}"
// Protobuf is part of the ABI, so include it as a compile/api dependency.
api "com.google.protobuf:protobuf-java:${rootProject.ext.protobufVersion}"
implementation 'androidx.sqlite:sqlite:2.1.0'
implementation "androidx.sqlite:sqlite:${rootProject.ext.sqliteVersion}"
implementation 'com.jakewharton.timber:timber:5.0.1'

testImplementation 'junit:junit:4.13.2'
Expand Down