This is a set of utilities for Android build system.
NOTE: This project is still alpha-qality; API will be change without notice
Converts the input icon file into grayscaled one.
Create outputFile
from inputFile
if it does not exist.
You can force overwrite with specifies the true
to the 3rd argument.
Creates local.properties
if it does not exist, which includes
sdk.dir
, ndk.dir
and extra
properties.
Creates a resource XML file, which contains dict
.
Prases or reads a version object, which has toVersionCode()
and toVersionName()
methods.
Set buildConfigField
from Map
. Requirements to 'com.android.tools.build:gradle:0.8.0' or later.
// For example
android.variantFilter{ variant ->
def buildConfigMap = [
'APP_NAME': 'MyApp' + variant.buildType.name.capitalize(),
'EXTENSION_MIN_SDK_INT': 14,
'API_SERVER_PRODUCTION': false,
]
setBuildConfigField(variant.buildType, buildConfigMap)
// or
//setBuildConfigField(variant.flavors.get(0), buildConfigMap)
}
/**
* //Build result
*
* public final class BuildConfig {
* ...
* // Fields from build type: debug
* public static final String APP_NAME = "MyAppDebug";
* public static final Integer EXTENSION_MIN_SDK_INT = 14;
* public static final Boolean API_SERVER_PRODUCTION = false;
* }
*/
- https://github.com/gfx/Android-HankeiN which uses this project
This program is free software; you can redistribute it and/or modify it under the same terms of the MIT license.