From 3bd98888ee9ca74cc9aad1f42d3fe01883630bdb Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 26 Jun 2020 09:07:50 -0400 Subject: [PATCH] Use Kotlin DSL for Duktape stub gradle file - Update to Java 8 - Move stub to common.gradle --- common.gradle | 1 + lib/duktape-stub/build.gradle | 13 ------------- lib/duktape-stub/build.gradle.kts | 16 ++++++++++++++++ src/all/mangaplus/build.gradle | 1 - src/en/mangahere/build.gradle | 4 ---- src/zh/manhuadui/build.gradle | 4 ---- src/zh/manhuagui/build.gradle | 1 - src/zh/pufei/build.gradle | 4 ---- src/zh/wuqimanga/build.gradle | 4 ---- 9 files changed, 17 insertions(+), 31 deletions(-) delete mode 100644 lib/duktape-stub/build.gradle create mode 100644 lib/duktape-stub/build.gradle.kts diff --git a/common.gradle b/common.gradle index 97a5467bb..7631836e4 100644 --- a/common.gradle +++ b/common.gradle @@ -76,6 +76,7 @@ dependencies { compileOnly 'org.jsoup:jsoup:1.10.2' compileOnly 'com.google.code.gson:gson:2.8.2' compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0' + compileOnly project(':duktape-stub') } preBuild.dependsOn(lintKotlin) diff --git a/lib/duktape-stub/build.gradle b/lib/duktape-stub/build.gradle deleted file mode 100644 index 20bfc7332..000000000 --- a/lib/duktape-stub/build.gradle +++ /dev/null @@ -1,13 +0,0 @@ -apply plugin: 'java' - -sourceSets { - main { - java.srcDirs = ['src'] - } -} - -dependencies { -} - -sourceCompatibility = "1.6" -targetCompatibility = "1.6" diff --git a/lib/duktape-stub/build.gradle.kts b/lib/duktape-stub/build.gradle.kts new file mode 100644 index 000000000..b07c0af69 --- /dev/null +++ b/lib/duktape-stub/build.gradle.kts @@ -0,0 +1,16 @@ +plugins { + java +} + +sourceSets { + main { + java { + srcDirs(listOf("src")) + } + } +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} diff --git a/src/all/mangaplus/build.gradle b/src/all/mangaplus/build.gradle index 4b1d33b4b..ffa7e86f4 100644 --- a/src/all/mangaplus/build.gradle +++ b/src/all/mangaplus/build.gradle @@ -13,7 +13,6 @@ ext { dependencies { implementation 'org.jetbrains.kotlinx:kotlinx-serialization-protobuf:0.20.0' implementation 'org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0' - compileOnly project(':duktape-stub') } apply from: "$rootDir/common.gradle" diff --git a/src/en/mangahere/build.gradle b/src/en/mangahere/build.gradle index d87f6078f..68be23ceb 100644 --- a/src/en/mangahere/build.gradle +++ b/src/en/mangahere/build.gradle @@ -9,8 +9,4 @@ ext { libVersion = '1.2' } -dependencies { - compileOnly project(':duktape-stub') -} - apply from: "$rootDir/common.gradle" diff --git a/src/zh/manhuadui/build.gradle b/src/zh/manhuadui/build.gradle index 61b575b93..4ac00ef49 100644 --- a/src/zh/manhuadui/build.gradle +++ b/src/zh/manhuadui/build.gradle @@ -9,8 +9,4 @@ ext { libVersion = '1.2' } -dependencies { - compileOnly project(':duktape-stub') -} - apply from: "$rootDir/common.gradle" diff --git a/src/zh/manhuagui/build.gradle b/src/zh/manhuagui/build.gradle index 29fe91f3b..c498b96d5 100644 --- a/src/zh/manhuagui/build.gradle +++ b/src/zh/manhuagui/build.gradle @@ -11,7 +11,6 @@ ext { dependencies { implementation project(':lib-ratelimit') - compileOnly project(':duktape-stub') compileOnly "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" compileOnly "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" } diff --git a/src/zh/pufei/build.gradle b/src/zh/pufei/build.gradle index a50b40b9d..298bacbd0 100644 --- a/src/zh/pufei/build.gradle +++ b/src/zh/pufei/build.gradle @@ -9,8 +9,4 @@ ext { libVersion = '1.2' } -dependencies { - compileOnly project(':duktape-stub') -} - apply from: "$rootDir/common.gradle" diff --git a/src/zh/wuqimanga/build.gradle b/src/zh/wuqimanga/build.gradle index efc090df8..9af77bcdb 100644 --- a/src/zh/wuqimanga/build.gradle +++ b/src/zh/wuqimanga/build.gradle @@ -9,8 +9,4 @@ ext { libVersion = '1.2' } -dependencies { - compileOnly project(':duktape-stub') -} - apply from: "$rootDir/common.gradle"