@@ -13,68 +13,85 @@ allprojects {
13
13
repositories {
14
14
google()
15
15
jcenter()
16
- flatDir {
17
- dirs ' libs'
18
- }
16
+ {%- for repo in args. gradle_repositories % }
17
+ {{repo}}
18
+ {%- endfor % }
19
+ flatDir {
20
+ dirs ' libs'
21
+ }
19
22
}
20
23
}
21
24
22
25
apply plugin : ' com.android.application'
23
26
24
27
android {
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
+ }
33
36
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
+ }
43
46
{%- endif % }
44
47
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
+ }
54
65
55
66
compileOptions {
56
67
sourceCompatibility JavaVersion . VERSION_1_7
57
68
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 % }
58
75
}
59
76
60
77
sourceSets {
61
78
main {
62
79
jniLibs. srcDir ' libs'
63
- }
80
+ }
64
81
}
65
82
66
83
}
67
84
68
85
dependencies {
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 % }
80
97
}
0 commit comments