Skip to content

Commit

Permalink
Moved Android module config into convention plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
LachlanMcKee committed Aug 20, 2023
1 parent 965772d commit 8c9fc66
Show file tree
Hide file tree
Showing 40 changed files with 276 additions and 521 deletions.
29 changes: 3 additions & 26 deletions appyx-components/experimental/cards/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,8 @@ plugins {
id("org.jetbrains.compose")
}


android {
namespace = "com.bumble.appyx.components.experimental.cards.android"
compileSdk = libs.versions.androidCompileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
unitTests.all {
it.useJUnitPlatform()
}
}
packagingOptions {
resources.excludes.apply {
add("META-INF/LICENSE.md")
add("META-INF/LICENSE-notice.md")
}
}
appyx {
namespace.set("com.bumble.appyx.components.experimental.cards.android")
}

dependencies {
Expand All @@ -36,11 +16,8 @@ dependencies {
implementation(project(":appyx-interactions:appyx-interactions"))
implementation(project(":appyx-components:experimental:cards:cards"))
implementation(composeBom)
androidTestImplementation(libs.compose.ui.test.junit4)

androidTestImplementation(libs.compose.ui.test.junit4)
androidTestImplementation(libs.junit.api)
testRuntimeOnly(libs.junit.engine)
testRuntimeOnly(libs.junit.vintage)

androidTestImplementation(libs.compose.ui.test.manifest)
}
15 changes: 4 additions & 11 deletions appyx-components/experimental/cards/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ plugins {
id("com.google.devtools.ksp")
}

appyx {
androidNamespace.set("com.bumble.appyx.components.experimental.cards.common")
}

kotlin {
android {
publishLibraryVariants("release")
Expand Down Expand Up @@ -40,17 +44,6 @@ kotlin {
}
}

android {
namespace = "com.bumble.appyx.components.experimental.cards.common"
compileSdk = libs.versions.androidCompileSdk.get().toInt()
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")

defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()
}
}

dependencies {
add("kspCommonMainMetadata", project(":ksp:mutable-ui-processor"))
add("kspAndroid", project(":ksp:mutable-ui-processor"))
Expand Down
14 changes: 4 additions & 10 deletions appyx-components/experimental/modal/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ plugins {
id("com.google.devtools.ksp")
}

appyx {
androidNamespace.set("com.bumble.appyx.components.experimental.modal")
}

kotlin {
android {
publishLibraryVariants("release")
Expand Down Expand Up @@ -45,16 +49,6 @@ kotlin {
}
}

android {
compileSdk = libs.versions.androidCompileSdk.get().toInt()
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")

defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()
}
}

dependencies {
add("kspCommonMainMetadata", project(":ksp:mutable-ui-processor"))
add("kspAndroid", project(":ksp:mutable-ui-processor"))
Expand Down
29 changes: 3 additions & 26 deletions appyx-components/experimental/promoter/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,8 @@ plugins {
id("org.jetbrains.compose")
}


android {
namespace = "com.bumble.appyx.components.experimental.promoter.android"
compileSdk = libs.versions.androidCompileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
unitTests.all {
it.useJUnitPlatform()
}
}
packagingOptions {
resources.excludes.apply {
add("META-INF/LICENSE.md")
add("META-INF/LICENSE-notice.md")
}
}
appyx {
namespace.set("com.bumble.appyx.components.experimental.promoter.android")
}

dependencies {
Expand All @@ -35,11 +15,8 @@ dependencies {
implementation(project(":appyx-interactions:appyx-interactions"))
implementation(project(":appyx-components:experimental:promoter:promoter"))
implementation(composeBom)
androidTestImplementation(libs.compose.ui.test.junit4)

androidTestImplementation(libs.compose.ui.test.junit4)
androidTestImplementation(libs.junit.api)
testRuntimeOnly(libs.junit.engine)
testRuntimeOnly(libs.junit.vintage)

androidTestImplementation(libs.compose.ui.test.manifest)
}
15 changes: 4 additions & 11 deletions appyx-components/experimental/promoter/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ plugins {
id("com.google.devtools.ksp")
}

appyx {
androidNamespace.set("com.bumble.appyx.components.experimental.promoter.common")
}

kotlin {
android {
publishLibraryVariants("release")
Expand Down Expand Up @@ -41,17 +45,6 @@ kotlin {
}
}

android {
namespace = "com.bumble.appyx.components.experimental.promoter.common"
compileSdk = libs.versions.androidCompileSdk.get().toInt()
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")

defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()
}
}

dependencies {
add("kspCommonMainMetadata", project(":ksp:mutable-ui-processor"))
add("kspAndroid", project(":ksp:mutable-ui-processor"))
Expand Down
24 changes: 2 additions & 22 deletions appyx-components/experimental/puzzle15/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,8 @@ plugins {
id("org.jetbrains.compose")
}


android {
namespace = "com.bumble.appyx.components.experimental.puzzle15.android"
compileSdk = libs.versions.androidCompileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
unitTests.all {
it.useJUnitPlatform()
}
}
packagingOptions {
resources.excludes.apply {
add("META-INF/LICENSE.md")
add("META-INF/LICENSE-notice.md")
}
}
appyx {
namespace.set("com.bumble.appyx.components.experimental.puzzle15.android")
}

dependencies {
Expand Down
15 changes: 4 additions & 11 deletions appyx-components/experimental/puzzle15/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ plugins {
id("com.google.devtools.ksp")
}

appyx {
androidNamespace.set("com.bumble.appyx.components.experimental.puzzle15.common")
}

kotlin {
android {
publishLibraryVariants("release")
Expand Down Expand Up @@ -40,17 +44,6 @@ kotlin {
}
}

android {
namespace = "com.bumble.appyx.components.experimental.puzzle15.common"
compileSdk = libs.versions.androidCompileSdk.get().toInt()
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")

defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()
}
}

dependencies {
add("kspCommonMainMetadata", project(":ksp:mutable-ui-processor"))
add("kspAndroid", project(":ksp:mutable-ui-processor"))
Expand Down
25 changes: 2 additions & 23 deletions appyx-components/internal/test-drive/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,10 @@ plugins {
id("com.bumble.appyx.android.library")
id("org.jetbrains.compose")
id("appyx-screenshots")
kotlin("android")
}


android {
namespace = "com.bumble.appyx.components.internal.testdrive.android"
compileSdk = libs.versions.androidCompileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
unitTests.all {
it.useJUnitPlatform()
}
}
packagingOptions {
resources.excludes.apply {
add("META-INF/LICENSE.md")
add("META-INF/LICENSE-notice.md")
}
}
appyx {
namespace.set("com.bumble.appyx.components.internal.testdrive.android")
}

dependencies {
Expand Down
14 changes: 4 additions & 10 deletions appyx-components/internal/test-drive/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ plugins {
id("com.google.devtools.ksp")
}

appyx {
androidNamespace.set("com.bumble.appyx.components.internal.testdrive")
}

kotlin {
android {
publishLibraryVariants("release")
Expand Down Expand Up @@ -41,16 +45,6 @@ kotlin {
}
}

android {
compileSdk = libs.versions.androidCompileSdk.get().toInt()
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")

defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()
}
}

dependencies {
add("kspCommonMainMetadata", project(":ksp:mutable-ui-processor"))
add("kspAndroid", project(":ksp:mutable-ui-processor"))
Expand Down
28 changes: 2 additions & 26 deletions appyx-components/stable/backstack/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,8 @@ plugins {
id("org.jetbrains.compose")
}


android {
namespace = "com.bumble.appyx.components.backstack.android"
compileSdk = libs.versions.androidCompileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
unitTests.all {
it.useJUnitPlatform()
}
}
packagingOptions {
resources.excludes.apply {
add("META-INF/LICENSE.md")
add("META-INF/LICENSE-notice.md")
}
}
appyx {
namespace.set("com.bumble.appyx.components.backstack.android")
}

dependencies {
Expand All @@ -35,10 +15,6 @@ dependencies {
androidTestImplementation(project(":appyx-interactions:android"))
androidTestImplementation(project(":appyx-interactions:appyx-interactions"))
androidTestImplementation(libs.compose.ui.test.junit4)

androidTestImplementation(libs.junit.api)
testRuntimeOnly(libs.junit.engine)
testRuntimeOnly(libs.junit.vintage)

androidTestImplementation(libs.compose.ui.test.manifest)
}
14 changes: 4 additions & 10 deletions appyx-components/stable/backstack/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ plugins {
id("com.google.devtools.ksp")
}

appyx {
androidNamespace.set("com.bumble.appyx.components.backstack")
}

kotlin {
android {
publishLibraryVariants("release")
Expand Down Expand Up @@ -41,16 +45,6 @@ kotlin {
}
}

android {
compileSdk = libs.versions.androidCompileSdk.get().toInt()
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")

defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()
}
}

dependencies {
add("kspCommonMainMetadata", project(":ksp:mutable-ui-processor"))
add("kspAndroid", project(":ksp:mutable-ui-processor"))
Expand Down
Loading

0 comments on commit 8c9fc66

Please sign in to comment.