1
- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1
+ import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
2
2
import org.jmailen.gradle.kotlinter.tasks.FormatTask
3
3
import org.jmailen.gradle.kotlinter.tasks.LintTask
4
4
5
+ @Suppress(" DSL_SCOPE_VIOLATION" )
5
6
plugins {
6
- kotlin( " jvm" ) version kotlinVersion
7
- kotlin( " plugin. serialization" ) version kotlinVersion
8
- id( " org.jmailen .kotlinter" ) version " 3.12.0 "
9
- id( " com.github.gmazzo. buildconfig" ) version " 3.1.0 " apply false
10
- id( " de.undercouch .download" ) version " 5.3.0 "
7
+ alias(libs.plugins.kotlin. jvm)
8
+ alias(libs.plugins.kotlin. serialization)
9
+ alias(libs.plugins .kotlinter)
10
+ alias(libs.plugins. buildconfig) apply false
11
+ alias(libs.plugins .download)
11
12
}
12
13
13
14
allprojects {
@@ -23,25 +24,17 @@ allprojects {
23
24
}
24
25
}
25
26
26
- val projects = listOf (
27
- project(" :AndroidCompat" ),
28
- project(" :AndroidCompat:Config" ),
29
- project(" :server" )
30
- )
31
-
32
- configure(projects) {
33
- apply (plugin = " org.jetbrains.kotlin.jvm" )
34
- apply (plugin = " org.jetbrains.kotlin.plugin.serialization" )
35
- apply (plugin = " org.jmailen.kotlinter" )
36
-
37
- java {
38
- sourceCompatibility = JavaVersion .VERSION_1_8
39
- targetCompatibility = JavaVersion .VERSION_1_8
27
+ subprojects {
28
+ plugins.withType<JavaPlugin > {
29
+ extensions.configure<JavaPluginExtension > {
30
+ sourceCompatibility = JavaVersion .VERSION_1_8
31
+ targetCompatibility = JavaVersion .VERSION_1_8
32
+ }
40
33
}
41
34
42
35
tasks {
43
- withType<KotlinCompile > {
44
- dependsOn(formatKotlin)
36
+ withType<KotlinJvmCompile > {
37
+ dependsOn(" formatKotlin" )
45
38
kotlinOptions {
46
39
jvmTarget = JavaVersion .VERSION_1_8 .toString()
47
40
}
@@ -55,58 +48,4 @@ configure(projects) {
55
48
source(files(" src/kotlin" ))
56
49
}
57
50
}
58
-
59
-
60
- dependencies {
61
- // Kotlin
62
- implementation(kotlin(" stdlib-jdk8" ))
63
- implementation(kotlin(" reflect" ))
64
- testImplementation(kotlin(" test-junit5" ))
65
-
66
- // coroutines
67
- val coroutinesVersion = " 1.6.4"
68
- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion " )
69
- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutinesVersion " )
70
- testImplementation(" org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion " )
71
-
72
- val kotlinSerializationVersion = " 1.4.1"
73
- implementation(" org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion " )
74
- implementation(" org.jetbrains.kotlinx:kotlinx-serialization-protobuf:$kotlinSerializationVersion " )
75
-
76
- // Dependency Injection
77
- implementation(" org.kodein.di:kodein-di-conf-jvm:7.15.0" )
78
-
79
- // Logging
80
- // Stuck on old versions since
81
- // 1. Logback 1.3.0+ requires Java 9
82
- // 2. Slf4j 2.0.0+ doesn't register older versions of Logback
83
- // 3. Kotlin-logging 3.0.2+ requires Java 11, but this is probably a bug
84
- implementation(" org.slf4j:slf4j-api:1.7.32" )
85
- implementation(" ch.qos.logback:logback-classic:1.2.6" )
86
- implementation(" io.github.microutils:kotlin-logging:2.1.21" )
87
-
88
- // ReactiveX
89
- implementation(" io.reactivex:rxjava:1.3.8" )
90
-
91
- // dependency both in AndroidCompat and extensions, version locked by Tachiyomi app/extensions
92
- implementation(" org.jsoup:jsoup:1.15.3" )
93
-
94
- // dependency of :AndroidCompat:Config
95
- implementation(" com.typesafe:config:1.4.2" )
96
- implementation(" io.github.config4k:config4k:0.5.0" )
97
-
98
- // to get application content root
99
- implementation(" net.harawata:appdirs:1.2.1" )
100
-
101
- // dex2jar
102
- val dex2jarVersion = " v56"
103
- implementation(" com.github.ThexXTURBOXx.dex2jar:dex-translator:$dex2jarVersion " )
104
- implementation(" com.github.ThexXTURBOXx.dex2jar:dex-tools:$dex2jarVersion " )
105
-
106
- // APK parser
107
- implementation(" net.dongliu:apk-parser:2.6.10" )
108
-
109
- // dependency both in AndroidCompat and server, version locked by javalin
110
- implementation(" com.fasterxml.jackson.core:jackson-annotations:2.12.4" )
111
- }
112
51
}
0 commit comments