Deduplicate lib build scripts (#1392)

This commit is contained in:
stevenyomi 2024-02-19 14:00:22 +00:00 committed by GitHub
parent 00dc9fedb4
commit cf41ed9cf8
12 changed files with 36 additions and 197 deletions

View File

@ -1,17 +1,3 @@
buildscript {
repositories {
mavenCentral()
google()
maven(url = "https://plugins.gradle.org/m2/")
}
dependencies {
classpath(libs.gradle.agp)
classpath(libs.gradle.kotlin)
classpath(libs.gradle.serialization)
classpath(libs.gradle.kotlinter)
}
}
allprojects { allprojects {
repositories { repositories {
mavenCentral() mavenCentral()

View File

@ -0,0 +1,26 @@
plugins {
id("com.android.library")
kotlin("android")
id("kotlinx-serialization")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.lib.${project.name}"
buildFeatures {
resValues = false
shaders = false
}
}
// TODO: use versionCatalogs.named("libs") in Gradle 8.5
val libs = project.extensions.getByType<VersionCatalogsExtension>().named("libs")
dependencies {
compileOnly(libs.findBundle("common").get())
}

View File

@ -1,23 +1,3 @@
plugins { plugins {
id("com.android.library") id("lib-android")
kotlin("android")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.lib.cookieinterceptor"
}
repositories {
mavenCentral()
}
dependencies {
compileOnly(libs.kotlin.stdlib)
compileOnly(libs.okhttp)
} }

View File

@ -1,22 +1,3 @@
plugins { plugins {
id("com.android.library") id("lib-android")
kotlin("android")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.lib.cryptoaes"
}
repositories {
mavenCentral()
}
dependencies {
compileOnly(libs.kotlin.stdlib)
} }

View File

@ -1,24 +1,3 @@
plugins { plugins {
id("com.android.library") id("lib-android")
kotlin("android")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.lib.dataimage"
}
repositories {
mavenCentral()
}
dependencies {
compileOnly(libs.kotlin.stdlib)
compileOnly(libs.okhttp)
compileOnly(libs.jsoup)
} }

View File

@ -1,22 +1,3 @@
plugins { plugins {
id("com.android.library") id("lib-android")
kotlin("android")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.lib.i18n"
}
repositories {
mavenCentral()
}
dependencies {
compileOnly(libs.kotlin.stdlib)
} }

View File

@ -1,12 +1,3 @@
plugins { plugins {
`java-library` id("lib-android")
kotlin("jvm")
}
repositories {
mavenCentral()
}
dependencies {
compileOnly(libs.kotlin.stdlib)
} }

View File

@ -1,23 +1,3 @@
plugins { plugins {
id("com.android.library") id("lib-android")
kotlin("android")
id("kotlinx-serialization")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.lib.randomua"
}
repositories {
mavenCentral()
}
dependencies {
compileOnly(libs.bundles.common)
} }

View File

@ -1,24 +1,7 @@
plugins { plugins {
id("com.android.library") id("lib-android")
kotlin("android")
id("kotlinx-serialization")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.lib.speedbinb"
}
repositories {
mavenCentral()
} }
dependencies { dependencies {
compileOnly(libs.bundles.common)
implementation(project(":lib:textinterceptor")) implementation(project(":lib:textinterceptor"))
} }

View File

@ -1,22 +1,3 @@
plugins { plugins {
id("com.android.library") id("lib-android")
kotlin("android")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.lib.synchrony"
}
repositories {
mavenCentral()
}
dependencies {
compileOnly(libs.bundles.common)
} }

View File

@ -1,23 +1,3 @@
plugins { plugins {
id("com.android.library") id("lib-android")
kotlin("android")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.lib.textinterceptor"
}
repositories {
mavenCentral()
}
dependencies {
compileOnly(libs.kotlin.stdlib)
compileOnly(libs.okhttp)
} }

View File

@ -1,12 +1,3 @@
plugins { plugins {
`java-library` id("lib-android")
kotlin("jvm")
}
repositories {
mavenCentral()
}
dependencies {
compileOnly(libs.kotlin.stdlib)
} }