Gradle build script with application
- Java 1.7+
- Imagemagick 6.9+
Build command:
./gradlew generateApk -Pconfig=[config.properties]
-Pconfig=
- path to application configuration properties
Example: ./gradlew generateApk -Pconfig=/home/slava/ukrnet.properties]
Generated apk saved into generated/
directory with name [appname].apk
.
File content:
app.name=temp123
app.version=1.1
app.icon=/Volumes/User/icon.png
app.permissions=defaults/permisions.txt
sign.name=appcreator
sign.password=appcreator
sign.years=2000
url=ukr.net
locale=en
actionbar.enabled=true
actionbar.color=#ffffff
orientation=auto
cache=false
browser=internal
zoomcontrol=true
splash.enabled=true
splash.layout=match_parent
splash.background=#ffffff
splash.image=/Volumes/User/123.jpeg
push.enabled=false
push.appid=
push.clientkey=
ad.type=bottom
ad.admobid=ca-app-pub-3940256099942544/6300978111
menu.0.name=Temp0
menu.0.action=refresh
menu.0.icon=ic_at
menu.0.url=google.com.ua
menu.1.name=Temp1
menu.1.action=refresh
menu.1.icon=ic_at
menu.1.url=google.com.ua
menu.2.name=Temp2
menu.2.action=refresh
menu.2.icon=ic_home
menu.2.url=google.com.ua
menu.3.name=Temp3
menu.3.action=url
menu.3.icon=ic_share
menu.3.url=google.com.ua
sign properties are not required (using default instead). if no one menu item in config - used default menu.
- app.name - application name
- app.version - application version
- app.icon - path to icon
- app.permissions - path to txt file with permissions
- sign.name - alias name for keystore
- sign.password - password for keystore Important! Min length 6 symbols
- sign.year - validation years
- url - application ulr, e.g.
ukr.net
,www.google.com
- locale - application language, available values:
en
,fr
,auto
.auto
- equals device language. - actionbar.enabled - disable or enable action bar on top, available values:
true
,false
- actionbar.color - string representation hex color value, e.g
#ff0000
- red - orientation - device orientation, available:
portrait
,landscape
,auto
- cache - use cache:
true
,false
- browser - browser type:
internal
,external
- zoomcontrol - zoom control:
true
,false
- splash.enabled - show splash screen:
true
(required background image),false
- splash.layout - layout wrap:
wrap_content
,match_parent
- splash.background - background hex color of splash screen e.g
#ff0000
- red - splash.image -path to splash background image, e.g.
/Volumes/User/123.jpeg
- push.enabled - push notifications:
true
,false
- push.appid - gcm app id
- push.clientkey - client key
- ad.type - ad type:
top
,bottom
,disabled
- ad.admobid - ad mob id: string, e.g.
ca-app-pub-3940256099942544/6300978111
- menu.X.name - name for menu with index X, like
menu.0.name
,menu.1.name
... etc. - menu.X.action - action for menu:
disable
,refresh
,share
,about
,quit
,url
- menu.X.icon - icon for menu:
ic_at
,ic_home
,ic_info
,ic_new
,ic_close
,ic_refresh
,ic_setting
,ic_share
- menu.X.url - url for menu action, e.g.
ukr.net
,www.google.com
Gradle loggin params:
-q
or --quiet
QUIET and higher
-i
or --info
INFO and higher
-d
or --debug
DEBUG and higher (that is, all log messages)
Write out of build to file:
./gradlew generateApk ... >> log.out