Revert "Use Gradle version catalog to simplify dependencies (#10938)"
This reverts commit c83960aaef
.
This commit is contained in:
parent
c83960aaef
commit
985f285fc7
|
@ -108,7 +108,7 @@ Extensions rely on [extensions-lib](https://github.com/tachiyomiorg/extensions-l
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(':lib-ratelimit'))
|
implementation project(':lib-ratelimit')
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ dependencies {
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(':lib-dataimage'))
|
implementation project(':lib-dataimage')
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -130,12 +130,12 @@ For example, an extension that needs coroutines, it could add the following:
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(libs.bundles.coroutines)
|
compileOnly 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2'
|
||||||
|
compileOnly 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note that several dependencies are already exposed to all extensions via Gradle version catalog.
|
(Note that several dependencies are already exposed to all extensions via `common-dependencies.gradle`.)
|
||||||
> To view which are available view `libs.versions.toml` under the `gradle` folder
|
|
||||||
|
|
||||||
Notice that we're using `compileOnly` instead of `implementation`, since the app already contains it. You could use `implementation` instead for a new dependency, or you prefer not to rely on whatever the main app has at the expense of app size.
|
Notice that we're using `compileOnly` instead of `implementation`, since the app already contains it. You could use `implementation` instead for a new dependency, or you prefer not to rely on whatever the main app has at the expense of app size.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
buildscript {
|
||||||
|
ext.kotlin_version = '1.4.32'
|
||||||
|
ext.coroutines_version = '1.4.3'
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
google()
|
||||||
|
maven { url 'https://plugins.gradle.org/m2/' }
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:4.2.1'
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
||||||
|
classpath 'org.jmailen.gradle:kotlinter-gradle:3.4.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
google()
|
||||||
|
maven { url 'https://jitpack.io' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task clean(type: Delete) {
|
||||||
|
delete rootProject.buildDir
|
||||||
|
}
|
|
@ -1,27 +0,0 @@
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
google()
|
|
||||||
maven(url = "https://plugins.gradle.org/m2/")
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
val libs = project.extensions.getByType<VersionCatalogsExtension>()
|
|
||||||
.named("libs") as org.gradle.accessors.dm.LibrariesForLibs
|
|
||||||
classpath(libs.gradle.agp)
|
|
||||||
classpath(libs.gradle.kotlin)
|
|
||||||
classpath(libs.gradle.serialization)
|
|
||||||
classpath(libs.gradle.kotlinter)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
google()
|
|
||||||
maven(url = "https://jitpack.io")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register<Delete>("clean") {
|
|
||||||
delete(rootProject.buildDir)
|
|
||||||
}
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
object Dependencies {
|
||||||
|
object kotlin {
|
||||||
|
const val version = "1.4.32"
|
||||||
|
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
|
||||||
|
}
|
||||||
|
|
||||||
|
const val jsoup = "org.jsoup:jsoup:1.13.1"
|
||||||
|
const val okhttp = "com.squareup.okhttp3:okhttp:4.9.1"
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
// used both in common.gradle and themesources library
|
||||||
|
dependencies {
|
||||||
|
// Lib 1.2, but using specific commit so we don't need to bump up the version
|
||||||
|
compileOnly "com.github.tachiyomiorg:extensions-lib:58b2d3a"
|
||||||
|
|
||||||
|
// These are provided by the app itself
|
||||||
|
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
|
|
||||||
|
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
|
||||||
|
compileOnly 'com.squareup.okhttp3:okhttp:4.9.1'
|
||||||
|
compileOnly 'io.reactivex:rxjava:1.3.8'
|
||||||
|
compileOnly 'org.jsoup:jsoup:1.13.1'
|
||||||
|
compileOnly 'org.jetbrains.kotlinx:kotlinx-serialization-protobuf:1.2.0'
|
||||||
|
compileOnly 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.0'
|
||||||
|
}
|
|
@ -88,9 +88,9 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":core"))
|
implementation project(":core")
|
||||||
compileOnly(libs.bundles.common)
|
|
||||||
}
|
}
|
||||||
|
apply from: "$rootDir/common-dependencies.gradle"
|
||||||
|
|
||||||
preBuild.dependsOn(lintKotlin)
|
preBuild.dependsOn(lintKotlin)
|
||||||
lintKotlin.dependsOn(formatKotlin)
|
lintKotlin.dependsOn(formatKotlin)
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
[versions]
|
|
||||||
kotlin_version = "1.4.32"
|
|
||||||
coroutines_version = "1.4.3"
|
|
||||||
|
|
||||||
[libraries]
|
|
||||||
gradle-agp = { module = "com.android.tools.build:gradle", version = "4.2.1" }
|
|
||||||
gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin_version" }
|
|
||||||
gradle-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin_version" }
|
|
||||||
gradle-kotlinter = { module = "org.jmailen.gradle:kotlinter-gradle", version = "3.4.0" }
|
|
||||||
|
|
||||||
tachiyomi-lib = { module = "com.github.tachiyomiorg:extensions-lib", version = "58b2d3a" }
|
|
||||||
|
|
||||||
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin_version" }
|
|
||||||
kotlin-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version = "1.2.0" }
|
|
||||||
kotlin-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.2.0" }
|
|
||||||
|
|
||||||
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines_version" }
|
|
||||||
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines_version" }
|
|
||||||
|
|
||||||
injekt-core = { module = "com.github.inorichi.injekt:injekt-core", version = "65b0440" }
|
|
||||||
jsoup = { module = "org.jsoup:jsoup", version = "1.13.1" }
|
|
||||||
okhttp = { module = "com.squareup.okhttp3:okhttp", version = "4.9.1" }
|
|
||||||
rxandroid = { module = "io.reactivex:rxandroid", version = "1.2.1" }
|
|
||||||
rxjava = { module = "io.reactivex:rxjava", version = "1.3.8" }
|
|
||||||
|
|
||||||
[bundles]
|
|
||||||
common = ["tachiyomi-lib", "jsoup", "okhttp", "kotlin-stdlib", "injekt-core", "rxjava", "kotlin-protobuf", "kotlin-json"]
|
|
||||||
coroutines = ["coroutines-core", "coroutines-android"]
|
|
||||||
reactivex = ["rxandroid"]
|
|
|
@ -17,7 +17,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(libs.kotlin.stdlib)
|
compileOnly(Dependencies.kotlin.stdlib)
|
||||||
compileOnly(libs.okhttp)
|
compileOnly(Dependencies.okhttp)
|
||||||
compileOnly(libs.jsoup)
|
compileOnly(Dependencies.jsoup)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,6 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(libs.kotlin.stdlib)
|
compileOnly(Dependencies.kotlin.stdlib)
|
||||||
compileOnly(libs.okhttp)
|
compileOnly(Dependencies.okhttp)
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,9 +20,8 @@ repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
// dependencies
|
||||||
compileOnly(libs.bundles.common)
|
apply("$rootDir/common-dependencies.gradle")
|
||||||
}
|
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
val generateExtensions by registering {
|
val generateExtensions by registering {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
enableFeaturePreview("VERSION_CATALOGS")
|
|
||||||
|
|
||||||
include(":core")
|
include(":core")
|
||||||
|
|
||||||
include(":lib-ratelimit")
|
include(":lib-ratelimit")
|
||||||
|
|
|
@ -10,7 +10,8 @@ ext {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly libs.bundles.reactivex
|
compileOnly 'io.reactivex:rxandroid:1.2.1'
|
||||||
|
compileOnly 'io.reactivex:rxjava:1.3.8'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -10,7 +10,8 @@ ext {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly libs.bundles.coroutines
|
compileOnly "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
|
||||||
|
compileOnly "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
|
||||||
implementation project(':lib-ratelimit')
|
implementation project(':lib-ratelimit')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue