
* lib themesources copied from SnakeDoc83/tachiyomi-extensions/library * update to the newer Genkan * update genkan generator * GenkanOriginal * code cleanup * add all Genkan sources * generate inside generated-src, res override * src override * move overrides out of library * move overrides to a better place * remove leftover generated files * remove leftover generated files * add generators main class * comment the code * Now sources are purely generated * uncomment generators * enhance comments * icons by @as280093 * fix pathing issues * nullpointerexception proof * runAllGenerators task * more flexibility in lib structure, fix a fiew errors * update github workflows * correct nonames scans directory name * rename SK Scans to Sleeping Knight Scans * fix typo * update depencencies * remove defaultRes from dependencies * fix bug with nsfw * fix nsfw generation * themesourcesLibraryVersion is included in build.gradle extVersionCode * improve javadoc * fix formatting and language code generation * comply with #5214 * common dependencies * rename and move lib/themesources into /multisrc * use not depricated form * cleanup runAllGenerators task * cleanup even more * oops extra file * remove test code * comments * update docs and refactor * update docs * requested changes * clean up dependencies * sealed dataClass * refactor * refactor string generators * bring back writeAndroidManifest * update overrideVersionCode javadoc * update overrideVersionCode javadoc * move dependency to extension source * refactor runAllGenerators * improve docs * remove extra file
50 lines
1.5 KiB
Plaintext
50 lines
1.5 KiB
Plaintext
plugins {
|
|
id("com.android.library")
|
|
kotlin("android")
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion(Config.compileSdk)
|
|
buildToolsVersion(Config.buildTools)
|
|
|
|
defaultConfig {
|
|
minSdkVersion(29)
|
|
targetSdkVersion(Config.targetSdk)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
// dependencies
|
|
apply("$rootDir/common-dependencies.gradle")
|
|
|
|
|
|
|
|
tasks.register("runAllGenerators") {
|
|
doLast {
|
|
val isWindows = System.getProperty("os.name").toString().toLowerCase().contains("win")
|
|
val classPath = (configurations.debugCompileOnly.get().asFileTree.toList() +
|
|
listOf(
|
|
configurations.androidApis.get().asFileTree.first().absolutePath, // android.jar path
|
|
"$projectDir/build/intermediates/aar_main_jar/debug/classes.jar" // jar made from this module
|
|
))
|
|
.joinToString(if (isWindows) ";" else ":")
|
|
val javaPath = System.getProperty("java.home") + "/bin/java" // path of java
|
|
|
|
val mainClass = "eu.kanade.tachiyomi.multisrc.GeneratorMainKt" // Main class we want to execute
|
|
|
|
val javaCommand = if (isWindows) {
|
|
"\"$javaPath\" -classpath $classPath $mainClass".replace("/", "\\")
|
|
} else {
|
|
"$javaPath -classpath $classPath $mainClass"
|
|
}
|
|
val javaProcess = Runtime.getRuntime().exec(javaCommand)
|
|
val exitCode = javaProcess.waitFor()
|
|
if (exitCode != 0){
|
|
throw Exception("Running java failed with exit code: $exitCode")
|
|
}
|
|
}
|
|
}
|