@@ -13,68 +13,85 @@ allprojects {
1313 repositories {
1414 google()
1515 jcenter()
16- flatDir {
17- dirs ' libs'
18- }
16+ {%- for repo in args. gradle_repositories % }
17+ {{repo}}
18+ {%- endfor % }
19+ flatDir {
20+ dirs ' libs'
21+ }
1922 }
2023}
2124
2225apply plugin : ' com.android.application'
2326
2427android {
25- compileSdkVersion {{ android_api }}
26- buildToolsVersion ' {{ build_tools_version }}'
27- defaultConfig {
28- minSdkVersion {{ args. min_sdk_version }}
29- targetSdkVersion {{ android_api }}
30- versionCode {{ args. numeric_version }}
31- versionName ' {{ args.version }}'
32- }
28+ compileSdkVersion {{ android_api }}
29+ buildToolsVersion ' {{ build_tools_version }}'
30+ defaultConfig {
31+ minSdkVersion {{ args. min_sdk_version }}
32+ targetSdkVersion {{ android_api }}
33+ versionCode {{ args. numeric_version }}
34+ versionName ' {{ args.version }}'
35+ }
3336
34- {% if args. sign -% }
35- signingConfigs {
36- release {
37- storeFile file(System . getenv(" P4A_RELEASE_KEYSTORE" ))
38- keyAlias System . getenv(" P4A_RELEASE_KEYALIAS" )
39- storePassword System . getenv(" P4A_RELEASE_KEYSTORE_PASSWD" )
40- keyPassword System . getenv(" P4A_RELEASE_KEYALIAS_PASSWD" )
41- }
42- }
37+ {% if args. sign -% }
38+ signingConfigs {
39+ release {
40+ storeFile file(System . getenv(" P4A_RELEASE_KEYSTORE" ))
41+ keyAlias System . getenv(" P4A_RELEASE_KEYALIAS" )
42+ storePassword System . getenv(" P4A_RELEASE_KEYSTORE_PASSWD" )
43+ keyPassword System . getenv(" P4A_RELEASE_KEYALIAS_PASSWD" )
44+ }
45+ }
4346 {%- endif % }
4447
45- buildTypes {
46- debug {
47- }
48- release {
49- {% if args. sign -% }
50- signingConfig signingConfigs. release
51- {%- endif % }
52- }
53- }
48+ {% if args. packaging_options -% }
49+ packagingOptions {
50+ {%- for option in args. packaging_options % }
51+ {{option}}
52+ {%- endfor % }
53+ }
54+ {%- endif % }
55+
56+ buildTypes {
57+ debug {
58+ }
59+ release {
60+ {% if args. sign -% }
61+ signingConfig signingConfigs. release
62+ {%- endif % }
63+ }
64+ }
5465
5566 compileOptions {
5667 sourceCompatibility JavaVersion . VERSION_1_7
5768 targetCompatibility JavaVersion . VERSION_1_7
69+ {%- for compat in args. java_source_compat % }
70+ sourceCompatibility {{compat}}
71+ {%- endfor % }
72+ {%- for compat in args. java_target_compat % }
73+ targetCompatibility {{compat}}
74+ {%- endfor % }
5875 }
5976
6077 sourceSets {
6178 main {
6279 jniLibs. srcDir ' libs'
63- }
80+ }
6481 }
6582
6683}
6784
6885dependencies {
69- {%- for aar in aars % }
70- compile(name : ' {{ aar }}' , ext : ' aar' )
71- {%- endfor -% }
72- {%- for jar in jars % }
73- compile files(' src/main/libs/{{ jar }}' )
74- {%- endfor -% }
75- {%- if args. depends -% }
76- {%- for depend in args. depends % }
77- compile ' {{ depend }}'
78- {%- endfor % }
79- {%- endif % }
86+ {%- for aar in aars % }
87+ compile(name : ' {{ aar }}' , ext : ' aar' )
88+ {%- endfor -% }
89+ {%- for jar in jars % }
90+ compile files(' src/main/libs/{{ jar }}' )
91+ {%- endfor -% }
92+ {%- if args. depends -% }
93+ {%- for depend in args. depends % }
94+ compile ' {{ depend }}'
95+ {%- endfor % }
96+ {%- endif % }
8097}
0 commit comments