File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,3 @@ allprojects {
13
13
mavenCentral()
14
14
}
15
15
}
16
-
17
- def generateIfEmpty = { projectPath ->
18
- def properties = new File (projectPath, " gradle.properties" )
19
- if (! properties. exists()) {
20
- properties << new File (properties. getAbsolutePath() + " .example" ). readBytes()
21
- }
22
- }
23
- generateIfEmpty(' ./StudyplusAndroidSDK' )
24
- generateIfEmpty(' ./SDKExample' )
Original file line number Diff line number Diff line change 1
1
include ' :StudyplusAndroidSDK' , ' :SDKExample'
2
+
3
+ def setupDefaultProperties = { project ->
4
+ String dir = project. projectDir. absolutePath
5
+ def properties = new File (dir, " gradle.properties" )
6
+ def example = new File (properties. getAbsolutePath() + " .example" )
7
+ def notFound = ! properties. exists() && example. exists()
8
+ if (notFound){
9
+ properties << example. readBytes()
10
+ }
11
+ }
12
+ [' :StudyplusAndroidSDK' , ' :SDKExample' ]. each {
13
+ setupDefaultProperties project(it)
14
+ }
You can’t perform that action at this time.
0 commit comments