Skip to content

Commit d901378

Browse files
committed
Ensure tgx.extension validness + Add tgx.extension to local.properties.sample
1 parent f4b36fe commit d901378

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

buildSrc/src/main/kotlin/tgx/gradle/plugin/ModulePlugin.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ open class ModulePlugin : Plugin<Project> {
8585
val dontObfuscate = isExampleBuild || properties.getProperty("app.dontobfuscate", "false") == "true"
8686
val forceOptimize = properties.getProperty("app.forceoptimize") == "true"
8787
val appExtension = getOrSample("tgx.extension")
88+
if (appExtension != "none" && appExtension != "hms") {
89+
error("Unknown tgx.extension: $appExtension")
90+
}
8891
val isHuaweiBuild = appExtension == "hms"
8992

9093
project.extra.set("experimental", isExperimentalBuild)

local.properties.sample

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ telegram.api_hash=
2626

2727
## Obtain credentials to access YouTube API:
2828
# https://developers.google.com/youtube/android/player/register
29-
youtube.api_key=
29+
youtube.api_key=
30+
31+
## Extension module to apply.
32+
tgx.extension=none

0 commit comments

Comments
 (0)