Skip to content

Commit

Permalink
Configure android extensions in subprojects
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler authored and cketti committed Dec 7, 2022
1 parent 6c887d0 commit be9b4ef
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 309 deletions.
28 changes: 0 additions & 28 deletions app/autodiscovery/providersxml/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,4 @@ dependencies {

android {
namespace 'com.fsck.k9.autodiscovery.providersxml'

compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools

defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.robolectricSdk
}

lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}

kotlinOptions {
jvmTarget = kotlinJvmVersion
}

testOptions {
unitTests {
includeAndroidResources = true
}
}
}
28 changes: 0 additions & 28 deletions app/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,4 @@ dependencies {

android {
namespace 'com.fsck.k9.core'

compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools

defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.robolectricSdk
}

lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}

kotlinOptions {
jvmTarget = kotlinJvmVersion
}

testOptions {
unitTests {
includeAndroidResources = true
}
}
}
21 changes: 0 additions & 21 deletions app/crypto-openpgp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,4 @@ dependencies {

android {
namespace 'com.fsck.k9.crypto.openpgp'

compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools

defaultConfig {
minSdkVersion buildConfig.minSdk
}

lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}

kotlinOptions {
jvmTarget = kotlinJvmVersion
}
}
30 changes: 0 additions & 30 deletions app/k9mail/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ dependencies {
android {
namespace 'com.fsck.k9'

compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools

defaultConfig {
applicationId "com.fsck.k9"
testApplicationId "com.fsck.k9.tests"
Expand All @@ -59,13 +56,6 @@ android {
"hr", "is", "it", "lv", "lt", "hu", "nl", "nb", "pl", "pt_PT", "pt_BR", "ru", "ro", "sq", "sk", "sl",
"fi", "sv", "tr", "el", "be", "bg", "sr", "uk", "iw", "ar", "fa", "ml", "ko", "zh_CN", "zh_TW", "ja",
"fy"

minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.targetSdk

vectorDrawables.useSupportLibrary = true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
Expand Down Expand Up @@ -108,11 +98,6 @@ android {

lintOptions {
checkDependencies true

// Do not abort build if lint finds errors
abortOnError false

lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

packagingOptions {
Expand All @@ -135,21 +120,6 @@ android {
includeInApk = false
includeInBundle = false
}

compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}

kotlinOptions {
jvmTarget = kotlinJvmVersion
}

testOptions {
unitTests {
includeAndroidResources = true
}
}
}

if (project.hasProperty('keyAlias')) {
Expand Down
28 changes: 0 additions & 28 deletions app/storage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,4 @@ dependencies {

android {
namespace 'com.fsck.k9.storage'

compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools

defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.robolectricSdk
}

lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}

kotlinOptions {
jvmTarget = kotlinJvmVersion
}

testOptions {
unitTests {
includeAndroidResources = true
}
}
}
22 changes: 0 additions & 22 deletions app/testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,4 @@ dependencies {

android {
namespace 'com.fsck.k9.testing'

compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools

defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.robolectricSdk
}

lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}

kotlinOptions {
jvmTarget = kotlinJvmVersion
}
}
22 changes: 0 additions & 22 deletions app/ui/base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,4 @@ dependencies {

android {
namespace 'com.fsck.k9.ui.base'

compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools

defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.robolectricSdk
}

lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}

kotlinOptions {
jvmTarget = kotlinJvmVersion
}
}
28 changes: 0 additions & 28 deletions app/ui/legacy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,6 @@ dependencies {
android {
namespace 'com.fsck.k9.ui'

compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools

defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.robolectricSdk
}

buildTypes {
debug {
def useNewSetupUi = project.hasProperty('k9mail.useNewSetupUi') ? project.property('k9mail.useNewSetupUi') : "false"
Expand All @@ -93,24 +85,4 @@ android {
manifestPlaceholders = ['appAuthRedirectScheme': 'FIXME: override this in your app project']
}
}

lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}

kotlinOptions {
jvmTarget = kotlinJvmVersion
}

testOptions {
unitTests {
includeAndroidResources = true
}
}
}
22 changes: 0 additions & 22 deletions app/ui/message-list-widget/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ dependencies {
android {
namespace 'app.k9mail.ui.widget.list'

compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools

defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.robolectricSdk
}

buildTypes {
debug {
manifestPlaceholders = ['appAuthRedirectScheme': 'FIXME: override this in your app project']
Expand All @@ -27,18 +19,4 @@ android {
manifestPlaceholders = ['appAuthRedirectScheme': 'FIXME: override this in your app project']
}
}

lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}

kotlinOptions {
jvmTarget = kotlinJvmVersion
}
}
28 changes: 0 additions & 28 deletions app/ui/setup/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,4 @@ dependencies {

android {
namespace 'com.fsck.k9.ui.setup'

compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools

defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.robolectricSdk
}

lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}

kotlinOptions {
jvmTarget = kotlinJvmVersion
}

testOptions {
unitTests {
includeAndroidResources = true
}
}
}
35 changes: 31 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import com.android.build.gradle.BasePlugin
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile

buildscript {
ext {
buildConfig = [
'compileSdk': 33,
'targetSdk': 31,
'minSdk': 21,
'buildTools': '32.0.0',
'robolectricSdk': 31
]

Expand Down Expand Up @@ -112,6 +109,36 @@ subprojects {
}
}

plugins.withType(BasePlugin).configureEach {
project.android {
compileSdk 33

defaultConfig {
minSdk 21
targetSdk 31

vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}

testOptions {
unitTests {
includeAndroidResources = true
}
}
}
}

tasks.withType(Test) {
testLogging {
exceptionFormat "full"
Expand Down
Loading

0 comments on commit be9b4ef

Please sign in to comment.