Tachiyomi-Extensions/common.gradle

103 lines
2.9 KiB
Groovy
Raw Normal View History

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlinx-serialization'
2020-04-25 03:16:48 +00:00
apply plugin: 'org.jmailen.kotlinter'
2017-01-21 16:55:27 +00:00
android {
compileSdkVersion AndroidConfig.compileSdk
2017-01-21 16:55:27 +00:00
namespace "eu.kanade.tachiyomi.extension"
2017-02-25 15:51:30 +00:00
sourceSets {
main {
manifest.srcFile "AndroidManifest.xml"
2017-02-25 15:51:30 +00:00
java.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
2017-02-25 15:51:30 +00:00
}
2017-01-21 16:55:27 +00:00
}
defaultConfig {
minSdkVersion AndroidConfig.minSdk
targetSdkVersion AndroidConfig.targetSdk
2024-01-22 21:19:41 +00:00
applicationIdSuffix project.parent.name + "." + project.name
2017-01-21 16:55:27 +00:00
versionCode extVersionCode
versionName project.ext.properties.getOrDefault("libVersion", "1.4") + ".$extVersionCode"
base {
2024-01-22 21:19:41 +00:00
archivesName = "tachiyomi-$applicationIdSuffix-v$versionName"
}
def readmes = project.projectDir.listFiles({ File file ->
2022-06-06 22:45:48 +00:00
file.name == "README.md" || file.name == "CHANGELOG.md"
} as FileFilter)
def hasReadme = readmes != null && readmes.any { File file ->
file.name.startsWith("README")
}
def hasChangelog = readmes != null && readmes.any { File file ->
file.name.startsWith("CHANGELOG")
}
2017-01-21 16:55:27 +00:00
manifestPlaceholders = [
appName : "Tachiyomi: $extName",
2017-01-21 16:55:27 +00:00
extClass: extClass,
2021-02-11 22:34:38 +00:00
extFactory: project.ext.properties.getOrDefault("extFactory", ""),
nsfw: project.ext.properties.getOrDefault("isNsfw", false) ? 1 : 0,
hasReadme: hasReadme ? 1 : 0,
hasChangelog: hasChangelog ? 1 : 0,
2017-01-21 16:55:27 +00:00
]
}
signingConfigs {
release {
storeFile rootProject.file("signingkey.jks")
storePassword System.getenv("KEY_STORE_PASSWORD")
keyAlias System.getenv("ALIAS")
keyPassword System.getenv("KEY_PASSWORD")
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
}
}
dependenciesInfo {
includeInApk = false
}
2021-02-16 17:24:32 +00:00
buildFeatures {
resValues false
shaders false
buildConfig true
2021-02-16 17:24:32 +00:00
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
2023-02-11 22:30:31 +00:00
freeCompilerArgs += "-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
}
2023-02-11 19:21:03 +00:00
kotlinter {
experimentalRules = true
disabledRules = [
"experimental:argument-list-wrapping", // Doesn't play well with Android Studio
"experimental:comment-wrapping",
]
}
2017-01-21 16:55:27 +00:00
}
repositories {
mavenCentral()
}
dependencies {
implementation(project(":core"))
compileOnly(libs.bundles.common)
}
lib-themesources, split Genkan into single-source extensions (#5154) * 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
2021-02-06 22:32:04 +00:00
2020-04-25 03:16:48 +00:00
preBuild.dependsOn(lintKotlin)
lintKotlin.dependsOn(formatKotlin)