Include generator name in APK metadata
This commit is contained in:
parent
4fa642ea6e
commit
2004ad5d6e
|
@ -34,6 +34,7 @@ android {
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
appName : "Tachiyomi: $extName",
|
appName : "Tachiyomi: $extName",
|
||||||
extClass: extClass,
|
extClass: extClass,
|
||||||
|
extFactory: project.ext.properties.getOrDefault("extFactory", ""),
|
||||||
nsfw: project.ext.properties.getOrDefault("containsNsfw", false) ? 1 : 0,
|
nsfw: project.ext.properties.getOrDefault("containsNsfw", false) ? 1 : 0,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<application android:icon="@mipmap/ic_launcher" android:allowBackup="false" android:label="${appName}">
|
<application android:icon="@mipmap/ic_launcher" android:allowBackup="false" android:label="${appName}">
|
||||||
|
|
||||||
<meta-data android:name="tachiyomi.extension.class" android:value="${extClass}" />
|
<meta-data android:name="tachiyomi.extension.class" android:value="${extClass}" />
|
||||||
|
<meta-data android:name="tachiyomi.extension.factory" android:value="${extFactory}" />
|
||||||
<meta-data android:name="tachiyomi.extension.nsfw" android:value="${nsfw}" />
|
<meta-data android:name="tachiyomi.extension.nsfw" android:value="${nsfw}" />
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
|
@ -49,7 +49,7 @@ interface ThemeSourceGenerator {
|
||||||
return listOf("eu", "kanade", "tachiyomi", "multisrc", themePkg).joinToString(separator)
|
return listOf("eu", "kanade", "tachiyomi", "multisrc", themePkg).joinToString(separator)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun writeGradle(gradle: File, source: ThemeSourceData, baseVersionCode: Int) {
|
private fun writeGradle(gradle: File, source: ThemeSourceData, themePkg: String, baseVersionCode: Int) {
|
||||||
gradle.writeText("""
|
gradle.writeText("""
|
||||||
// THIS FILE IS AUTO-GENERATED; DO NOT EDIT
|
// THIS FILE IS AUTO-GENERATED; DO NOT EDIT
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
@ -59,6 +59,7 @@ interface ThemeSourceGenerator {
|
||||||
extName = '${source.name}'
|
extName = '${source.name}'
|
||||||
pkgNameSuffix = '${pkgNameSuffix(source, ".")}'
|
pkgNameSuffix = '${pkgNameSuffix(source, ".")}'
|
||||||
extClass = '.${source.className}'
|
extClass = '.${source.className}'
|
||||||
|
extFactory = '$themePkg'
|
||||||
extVersionCode = ${baseVersionCode + source.overrideVersionCode + multisrcLibraryVersion}
|
extVersionCode = ${baseVersionCode + source.overrideVersionCode + multisrcLibraryVersion}
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
${if (source.isNsfw) "containsNsfw = true\n" else ""}
|
${if (source.isNsfw) "containsNsfw = true\n" else ""}
|
||||||
|
@ -98,7 +99,7 @@ interface ThemeSourceGenerator {
|
||||||
// remove everything from past runs
|
// remove everything from past runs
|
||||||
cleanDirectory(projectRootFile)
|
cleanDirectory(projectRootFile)
|
||||||
|
|
||||||
writeGradle(projectGradleFile, source, baseVersionCode)
|
writeGradle(projectGradleFile, source, themePkg, baseVersionCode)
|
||||||
writeAndroidManifest(projectAndroidManifestFile, manifestOverridesPath)
|
writeAndroidManifest(projectAndroidManifestFile, manifestOverridesPath)
|
||||||
|
|
||||||
writeSourceClasses(projectSrcPath, srcOverridesPath, source, themePkg, themeClass)
|
writeSourceClasses(projectSrcPath, srcOverridesPath, source, themePkg, themeClass)
|
||||||
|
|
Loading…
Reference in New Issue