hide oauth api key
This commit is contained in:
parent
8cd60bdc69
commit
035639c5e9
|
@ -9,12 +9,14 @@ android {
|
||||||
|
|
||||||
def pwd = System.getenv("FCL_KEYSTORE_PASSWORD")
|
def pwd = System.getenv("FCL_KEYSTORE_PASSWORD")
|
||||||
def curseApiKey = System.getenv("CURSE_API_KEY")
|
def curseApiKey = System.getenv("CURSE_API_KEY")
|
||||||
if (pwd == null || curseApiKey == null) {
|
def oauthApiKey = System.getenv("OAUTH_API_KEY")
|
||||||
|
if (pwd == null || curseApiKey == null || oauthApiKey == null) {
|
||||||
if (new File("${rootDir}/local.properties").exists()) {
|
if (new File("${rootDir}/local.properties").exists()) {
|
||||||
Properties prop = new Properties()
|
Properties prop = new Properties()
|
||||||
prop.load(new FileInputStream("${rootDir}/local.properties"))
|
prop.load(new FileInputStream("${rootDir}/local.properties"))
|
||||||
pwd = prop.get("pwd")
|
pwd = prop.get("pwd")
|
||||||
curseApiKey = prop.get("curse.api.key")
|
curseApiKey = prop.get("curse.api.key")
|
||||||
|
oauthApiKey = prop.get("oauth.api.key")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +59,7 @@ android {
|
||||||
configureEach {
|
configureEach {
|
||||||
resValue "string", "app_version", "${defaultConfig.versionName}"
|
resValue "string", "app_version", "${defaultConfig.versionName}"
|
||||||
resValue "string", "curse_api_key", curseApiKey
|
resValue "string", "curse_api_key", curseApiKey
|
||||||
|
resValue "string", "oauth_api_key", oauthApiKey
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
applicationVariants.configureEach { variant ->
|
applicationVariants.configureEach { variant ->
|
||||||
|
|
|
@ -159,7 +159,7 @@ public final class OAuthServer extends NanoHTTPD implements OAuth.Session {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getClientId() {
|
public String getClientId() {
|
||||||
return "d903cc0e-c3b4-4a3c-b347-06c2e6269be0";
|
return FCLPath.CONTEXT.getString(R.string.oauth_api_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
<string name="app_name" translatable="false">Fold Craft Launcher</string>
|
<string name="app_name" translatable="false">Fold Craft Launcher</string>
|
||||||
<string name="app_version" translatable="false">1.1.3</string>
|
<string name="app_version" translatable="false">1.1.3</string>
|
||||||
|
|
||||||
|
<string name="oauth_api_key" translatable="false">null</string>
|
||||||
|
|
||||||
<string name="splash_permission_msg">No storage permission, please grant Fold Craft Launcher the permission.</string>
|
<string name="splash_permission_msg">No storage permission, please grant Fold Craft Launcher the permission.</string>
|
||||||
|
|
||||||
<string name="splash_title">Welcome to Fold Craft Launcher</string>
|
<string name="splash_title">Welcome to Fold Craft Launcher</string>
|
||||||
|
|
Loading…
Reference in New Issue