Skip to content

Commit

Permalink
Move build types to Convention
Browse files Browse the repository at this point in the history
  • Loading branch information
Iamlooker committed Jul 3, 2024
1 parent fc8a40a commit 3b339da
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 100 deletions.
2 changes: 1 addition & 1 deletion app/proguard.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

-dontwarn kotlinx.serialization.KSerializer
-dontwarn kotlinx.serialization.Serializable
-dontwarn org.slf4j.impl.StaticLoggerBinder
-dontwarn org.slf4j.impl.StaticLoggerBinder
13 changes: 13 additions & 0 deletions build-logic/structure/src/main/kotlin/AndroidLibraryPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ class AndroidLibraryPlugin : Plugin<Project> {
extensions.configure<LibraryExtension> {
configureKotlinAndroid(this)
defaultConfig.targetSdk = DefaultConfig.compileSdk
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"${rootDir.path}/app/proguard.pro"
)
}
create("alpha") {
initWith(getByName("debug"))
isMinifyEnabled = false
}
}
buildFeatures {
aidl = false
renderScript = false
Expand Down
11 changes: 0 additions & 11 deletions core/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@ android {
defaultConfig {
vectorDrawables.useSupportLibrary = true
}

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
create("alpha") {
initWith(getByName("debug"))
isMinifyEnabled = true
}
}
buildFeatures {
buildConfig = true
}
Expand Down
12 changes: 0 additions & 12 deletions core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ plugins {

android {
namespace = "com.looker.core.data"

buildTypes {
release {
// TODO: Enable once using
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
create("alpha") {
initWith(getByName("debug"))
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
11 changes: 0 additions & 11 deletions core/database/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ plugins {

android {
namespace = "com.looker.core.database"

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
create("alpha") {
initWith(getByName("debug"))
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
11 changes: 0 additions & 11 deletions core/datastore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ plugins {

android {
namespace = "com.looker.core.datastore"

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
create("alpha") {
initWith(getByName("debug"))
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
11 changes: 0 additions & 11 deletions core/di/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,4 @@ plugins {

android {
namespace = "com.looker.core.di"

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
create("alpha") {
initWith(getByName("debug"))
isMinifyEnabled = true
}
}
}
11 changes: 0 additions & 11 deletions core/domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ plugins {

android {
namespace = "com.looker.core.domain"

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
create("alpha") {
initWith(getByName("debug"))
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
10 changes: 0 additions & 10 deletions core/network/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ android {
value = "\"${DefaultConfig.versionName}\""
)
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
create("alpha") {
initWith(getByName("debug"))
isMinifyEnabled = true
}
}
buildFeatures {
buildConfig = true
}
Expand Down
11 changes: 0 additions & 11 deletions installer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ plugins {

android {
namespace = "com.looker.installer"

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
create("alpha") {
initWith(getByName("debug"))
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
11 changes: 0 additions & 11 deletions sync/fdroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ plugins {

android {
namespace = "com.looker.sync.fdroid"

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
create("alpha") {
initWith(getByName("debug"))
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down

0 comments on commit 3b339da

Please sign in to comment.