diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4cc23cf52..d9dd971be 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -250,10 +250,9 @@ apply from: "$rootDir/common.gradle" | `extName` | The name of the extension. Should be romanized if site name is not in English. | | `extClass` | Points to the class that implements `Source`. You can use a relative path starting with a dot (the package name is the base path). This is used to find and instantiate the source(s). | | `extVersionCode` | The extension version code. This must be a positive integer and incremented with any change to the code. | -| `libVersion` | (Optional, defaults to `1.4`) The version of the [extensions library](https://github.com/tachiyomiorg/extensions-lib) used. | | `isNsfw` | (Optional, defaults to `false`) Flag to indicate that a source contains NSFW content. | -The extension's version name is generated automatically by concatenating `libVersion` and `extVersionCode`. +The extension's version name is generated automatically by concatenating `1.4` and `extVersionCode`. With the example used above, the version would be `1.4.1`. ### Core dependencies diff --git a/common.gradle b/common.gradle index 885a68660..2a5d1a6f6 100644 --- a/common.gradle +++ b/common.gradle @@ -3,6 +3,9 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlinx-serialization' apply plugin: 'org.jmailen.kotlinter' +assert !ext.has("pkgNameSuffix") +assert !ext.has("libVersion") + android { compileSdk AndroidConfig.compileSdk @@ -21,14 +24,15 @@ android { targetSdk AndroidConfig.targetSdk applicationIdSuffix project.parent.name + "." + project.name versionCode extVersionCode - versionName project.ext.properties.getOrDefault("libVersion", "1.4") + ".$extVersionCode" + versionName "1.4.$versionCode" base { archivesName = "tachiyomi-$applicationIdSuffix-v$versionName" } + assert extClass.startsWith(".") manifestPlaceholders = [ appName : "Tachiyomi: $extName", extClass: extClass, - nsfw: project.ext.properties.getOrDefault("isNsfw", false) ? 1 : 0, + nsfw: ext.find("isNsfw") ? 1 : 0, ] }