1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-05 18:50:09 +02:00

Take "$VALUE" settings from environment variables

Set sdk_path and ndk_path defaults to $ANDROID_HOME and $ANDROID_NDK
This commit is contained in:
Daniel Martí 2013-12-06 12:37:53 +01:00
parent 5fc48172a7
commit 9ecf6fcf74
2 changed files with 13 additions and 9 deletions

View File

@ -1,21 +1,22 @@
# Copy this file to config.py, then amend the settings below according to # Copy this file to config.py, then amend the settings below according to
# your system configuration. # your system configuration.
# Path to the Android SDK ($ANDROID_HOME) # Path to the Android SDK, $ANDROID_HOME already set on most systems
sdk_path = "/path/to/android-sdk-linux_86" #sdk_path = "/path/to/android-sdk"
sdk_path = "$ANDROID_HOME"
# Path to the Android NDK ($ANDROID_NDK) # Path to the Android NDK, $ANDROID_NDK already set on most systems
# Legacy toolchains are only needed by some apps # Legacy toolchains are only needed by some apps
ndk_path = "/path/to/android-ndk-r9" #ndk_path = "/path/to/android-ndk"
ndk_path = "$ANDROID_NDK"
# Build tools version to be used # Build tools version to be used
build_tools = "18.1.1" build_tools = "18.1.1"
# Command for running maven 3 (could be mvn, mvn3, or a full path) # Command for running maven 3 (command or full path)
mvn3 = "mvn3" mvn3 = "mvn3"
# Command for running Gradle # Command for running Gradle (command or full path)
gradle = "gradle" gradle = "gradle"
# Android gradle plugin version # Android gradle plugin version
@ -105,8 +106,6 @@ stats_to_carbon = False
carbon_host = '0.0.0.0' carbon_host = '0.0.0.0'
carbon_port = 2003 carbon_port = 2003
#Set this to true to always use a build server. This saves specifying the #Set this to true to always use a build server. This saves specifying the
#--server option on dedicated secure build server hosts. #--server option on dedicated secure build server hosts.
build_server_always = False build_server_always = False

View File

@ -67,6 +67,11 @@ def read_config(opts, config_file='config.py'):
if options.verbose: if options.verbose:
print "Reading %s..." % config_file print "Reading %s..." % config_file
execfile(config_file, config) execfile(config_file, config)
for k, v in config.items():
if type(v) != str:
continue
if v[0] == '$':
config[k] = os.environ[v[1:]]
return config return config
def getapkname(app, build): def getapkname(app, build):