From c72fd8188614acf981ddfd9b9078927322e3c229 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 11 May 2021 22:14:56 +0200 Subject: Move common gradle setup to a single file Original idea by @TacoTheDank --- net/ssl/build.gradle | 58 ++-------------------------------------- net/sync/gpoddernet/build.gradle | 47 +------------------------------- net/sync/model/build.gradle | 47 +------------------------------- 3 files changed, 4 insertions(+), 148 deletions(-) (limited to 'net') diff --git a/net/ssl/build.gradle b/net/ssl/build.gradle index 32aa7fee0..2a47968d3 100644 --- a/net/ssl/build.gradle +++ b/net/ssl/build.gradle @@ -1,60 +1,6 @@ apply plugin: "com.android.library" - -android { - compileSdkVersion rootProject.ext.compileSdkVersion - - defaultConfig { - minSdkVersion rootProject.ext.minSdkVersion - targetSdkVersion rootProject.ext.targetSdkVersion - - multiDexEnabled false - - testApplicationId "de.danoeh.antennapod.core.tests" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile("proguard-android.txt") - } - debug { - // debug build has method count over 64k single-dex threshold. - // For building debug build to use on Android < 21 (pre-Android 5) devices, - // you need to manually change class - // de.danoeh.antennapod.PodcastApp to extend MultiDexApplication . - // See Issue #2813 - multiDexEnabled true - } - } - - flavorDimensions "market" - productFlavors { - free { - dimension "market" - } - play { - dimension "market" - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } - - lintOptions { - disable 'GradleDependency' - checkDependencies true - warningsAsErrors true - abortOnError true - } -} +apply from: "../../common.gradle" +apply from: "../../playFlavor.gradle" dependencies { annotationProcessor "androidx.annotation:annotation:$annotationVersion" diff --git a/net/sync/gpoddernet/build.gradle b/net/sync/gpoddernet/build.gradle index cd6d8d04c..eb5af1b60 100644 --- a/net/sync/gpoddernet/build.gradle +++ b/net/sync/gpoddernet/build.gradle @@ -1,50 +1,5 @@ apply plugin: "com.android.library" - -android { - compileSdkVersion rootProject.ext.compileSdkVersion - - defaultConfig { - minSdkVersion rootProject.ext.minSdkVersion - targetSdkVersion rootProject.ext.targetSdkVersion - - multiDexEnabled false - - testApplicationId "de.danoeh.antennapod.core.tests" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile("proguard-android.txt") - } - debug { - // debug build has method count over 64k single-dex threshold. - // For building debug build to use on Android < 21 (pre-Android 5) devices, - // you need to manually change class - // de.danoeh.antennapod.PodcastApp to extend MultiDexApplication . - // See Issue #2813 - multiDexEnabled true - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } - - lintOptions { - disable 'GradleDependency' - checkDependencies true - warningsAsErrors true - abortOnError true - } -} +apply from: "../../../common.gradle" dependencies { implementation project(':net:sync:model') diff --git a/net/sync/model/build.gradle b/net/sync/model/build.gradle index 299359602..e47040892 100644 --- a/net/sync/model/build.gradle +++ b/net/sync/model/build.gradle @@ -1,50 +1,5 @@ apply plugin: "com.android.library" - -android { - compileSdkVersion rootProject.ext.compileSdkVersion - - defaultConfig { - minSdkVersion rootProject.ext.minSdkVersion - targetSdkVersion rootProject.ext.targetSdkVersion - - multiDexEnabled false - - testApplicationId "de.danoeh.antennapod.core.tests" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile("proguard-android.txt") - } - debug { - // debug build has method count over 64k single-dex threshold. - // For building debug build to use on Android < 21 (pre-Android 5) devices, - // you need to manually change class - // de.danoeh.antennapod.PodcastApp to extend MultiDexApplication . - // See Issue #2813 - multiDexEnabled true - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } - - lintOptions { - disable 'GradleDependency' - checkDependencies true - warningsAsErrors true - abortOnError true - } -} +apply from: "../../../common.gradle" dependencies { implementation project(':model') -- cgit v1.2.3