Skip to content

Commit

Permalink
Update gradle scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyroid committed Jun 9, 2024
1 parent f169567 commit bf5823c
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 293 deletions.
52 changes: 37 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.android.build.gradle.LibraryExtension
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension
import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Expand All @@ -16,18 +17,16 @@ plugins {

subprojects {
tasks.withType<KotlinCompile>().configureEach {
kotlinExtension.sourceSets {
all {
languageSettings {
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
optIn("androidx.compose.foundation.ExperimentalFoundationApi")
optIn("androidx.compose.foundation.layout.ExperimentalLayoutApi")
optIn("androidx.compose.material3.ExperimentalMaterial3Api")
optIn("androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi")
optIn("androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi")
optIn("androidx.tv.material3.ExperimentalTvMaterial3Api")
optIn("com.google.accompanist.permissions.ExperimentalPermissionsApi")
}
kotlinExtension.sourceSets.all {
languageSettings {
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
optIn("androidx.compose.foundation.ExperimentalFoundationApi")
optIn("androidx.compose.foundation.layout.ExperimentalLayoutApi")
optIn("androidx.compose.material3.ExperimentalMaterial3Api")
optIn("androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi")
optIn("androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi")
optIn("androidx.tv.material3.ExperimentalTvMaterial3Api")
optIn("com.google.accompanist.permissions.ExperimentalPermissionsApi")
}
}
}
Expand All @@ -39,10 +38,33 @@ subprojects {
includeSourceInformation = true
val file = rootProject.layout.projectDirectory.file("compose_compiler_config.conf")
if (file.asFile.exists()) {
stabilityConfigurationFile.set(file)
stabilityConfigurationFile = file
}
metricsDestination = layout.buildDirectory.dir("compose_metrics")
reportsDestination = layout.buildDirectory.dir("compose_metrics")
}
}
plugins.withId("com.android.library") {
configure<LibraryExtension> {
compileSdk = 34
defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
metricsDestination.set(layout.buildDirectory.dir("compose_metrics"))
reportsDestination.set(layout.buildDirectory.dir("compose_metrics"))
}
}
}
22 changes: 0 additions & 22 deletions codec/lite/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,6 @@ plugins {

android {
namespace = "com.m3u.codec.lite"
compileSdk = 34

defaultConfig {
minSdk = 26

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
22 changes: 0 additions & 22 deletions codec/rich/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,6 @@ plugins {

android {
namespace = "com.m3u.codec.rich"
compileSdk = 34

defaultConfig {
minSdk = 26

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
19 changes: 0 additions & 19 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,6 @@ plugins {

android {
namespace = "com.m3u.core"
compileSdk = 34
defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
19 changes: 0 additions & 19 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ plugins {
}
android {
namespace = "com.m3u.data"
compileSdk = 34
defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
19 changes: 0 additions & 19 deletions feature/channel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,6 @@ plugins {

android {
namespace = "com.m3u.feature.channel"
compileSdk = 34
defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
19 changes: 0 additions & 19 deletions feature/crash/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ plugins {

android {
namespace = "com.m3u.feature.crash"
compileSdk = 34
defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
19 changes: 0 additions & 19 deletions feature/favorite/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ plugins {

android {
namespace = "com.m3u.feature.favorite"
compileSdk = 34
defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
19 changes: 0 additions & 19 deletions feature/foryou/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ plugins {

android {
namespace = "com.m3u.feature.foryou"
compileSdk = 34
defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
22 changes: 0 additions & 22 deletions feature/playlist-configuration/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,6 @@ plugins {

android {
namespace = "com.m3u.feature.playlist.configuration"
compileSdk = 34

defaultConfig {
minSdk = 26

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
19 changes: 0 additions & 19 deletions feature/playlist/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,6 @@ plugins {

android {
namespace = "com.m3u.feature.playlist"
compileSdk = 34
defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
19 changes: 0 additions & 19 deletions feature/setting/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ plugins {

android {
namespace = "com.m3u.feature.setting"
compileSdk = 34
defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
22 changes: 0 additions & 22 deletions i18n/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,6 @@ plugins {

android {
namespace = "com.m3u.i18n"
compileSdk = 34

defaultConfig {
minSdk = 26

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
Expand Down
Loading

0 comments on commit bf5823c

Please sign in to comment.