2020-04-25 03:16:48 +00:00
|
|
|
apply plugin: 'org.jmailen.kotlinter'
|
|
|
|
|
2017-01-21 16:55:27 +00:00
|
|
|
android {
|
2021-05-22 20:04:17 +00:00
|
|
|
compileSdkVersion AndroidConfig.compileSdk
|
2017-01-21 16:55:27 +00:00
|
|
|
|
2017-02-25 15:51:30 +00:00
|
|
|
sourceSets {
|
|
|
|
main {
|
2020-12-21 03:31:12 +00:00
|
|
|
manifest.srcFile "AndroidManifest.xml"
|
2017-02-25 15:51:30 +00:00
|
|
|
java.srcDirs = ['src']
|
2020-12-11 14:41:48 +00:00
|
|
|
res.srcDirs = ['res']
|
2017-02-25 15:51:30 +00:00
|
|
|
}
|
|
|
|
release {
|
2019-04-13 09:22:10 +00:00
|
|
|
manifest.srcFile "AndroidManifest.xml"
|
2017-02-25 15:51:30 +00:00
|
|
|
}
|
|
|
|
debug {
|
2019-04-13 09:22:10 +00:00
|
|
|
manifest.srcFile "AndroidManifest.xml"
|
2017-02-25 15:51:30 +00:00
|
|
|
}
|
2017-01-21 16:55:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defaultConfig {
|
2021-05-22 20:04:17 +00:00
|
|
|
minSdkVersion AndroidConfig.minSdk
|
|
|
|
targetSdkVersion AndroidConfig.targetSdk
|
2017-01-21 16:55:27 +00:00
|
|
|
applicationIdSuffix pkgNameSuffix
|
|
|
|
versionCode extVersionCode
|
2022-04-23 22:25:56 +00:00
|
|
|
versionName project.ext.properties.getOrDefault("libVersion", "1.2") + ".$extVersionCode"
|
2017-02-07 16:01:04 +00:00
|
|
|
setProperty("archivesBaseName", "tachiyomi-$pkgNameSuffix-v$versionName")
|
2022-01-22 14:48:52 +00:00
|
|
|
def readmes = project.projectDir.listFiles({ File file ->
|
|
|
|
file.name.equals("README.md") ||
|
|
|
|
file.name.equals("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 = [
|
2020-06-26 02:34:34 +00:00
|
|
|
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", ""),
|
2021-10-04 20:44:32 +00:00
|
|
|
nsfw: project.ext.properties.getOrDefault("isNsfw", false) ? 1 : 0,
|
2022-01-22 14:48:52 +00:00
|
|
|
hasReadme: hasReadme ? 1 : 0,
|
|
|
|
hasChangelog: hasChangelog ? 1 : 0,
|
2017-01-21 16:55:27 +00:00
|
|
|
]
|
|
|
|
}
|
2020-05-06 02:29:48 +00:00
|
|
|
|
2022-01-09 19:33:34 +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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-28 21:48:04 +00:00
|
|
|
dependenciesInfo {
|
|
|
|
includeInApk = false
|
|
|
|
}
|
|
|
|
|
2021-02-16 17:24:32 +00:00
|
|
|
buildFeatures {
|
|
|
|
// Disable unused AGP features
|
|
|
|
aidl false
|
|
|
|
renderScript false
|
|
|
|
resValues false
|
|
|
|
shaders false
|
|
|
|
}
|
|
|
|
|
2020-05-06 02:29:48 +00:00
|
|
|
compileOptions {
|
2020-08-08 19:59:03 +00:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
2020-05-06 02:29:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlinOptions {
|
2020-08-08 19:59:03 +00:00
|
|
|
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
2022-01-02 23:47:56 +00:00
|
|
|
freeCompilerArgs += "-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi"
|
2020-05-06 02:29:48 +00:00
|
|
|
}
|
2017-01-21 16:55:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
2021-02-08 13:30:05 +00:00
|
|
|
dependencies {
|
2022-02-28 12:25:23 +00:00
|
|
|
implementation(project(":core"))
|
|
|
|
compileOnly(libs.bundles.common)
|
2021-02-08 13:30:05 +00:00
|
|
|
}
|
2021-02-06 22:32:04 +00:00
|
|
|
|
2020-04-25 03:16:48 +00:00
|
|
|
preBuild.dependsOn(lintKotlin)
|
2020-12-18 22:26:45 +00:00
|
|
|
lintKotlin.dependsOn(formatKotlin)
|