File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,27 @@ allprojects {
40
40
vrProperties. load(project. rootProject. file(" mode/libraries/vr/library.properties" ). newDataInputStream())
41
41
ext. vrLibVersion = vrProperties. getProperty(" prettyVersion" )
42
42
43
+
44
+ def fn = project. rootProject. file(" local.properties" )
45
+ if (! fn. exists()) {
46
+ if (System . env[" ANDROID_SDK" ] != null ) {
47
+ def path = System . env[" ANDROID_SDK" ]
48
+ fn. withWriterAppend { w ->
49
+ w << " sdk.dir=${ path} \n "
50
+ }
51
+ } else {
52
+ throw new GradleException (
53
+ " The file local.properties does not exist, and there is no ANDROID_SDK environmental variable defined in the system.\n " +
54
+ " Define ANDROID_SDK so it points to the location of the Android SDK, or create the local.properties file manually\n " +
55
+ " and add the following line to it:\n " +
56
+ " sdk.dir=<path to Android SDK>" )
57
+ }
58
+
59
+
60
+ // new File( folder, 'file.txt' )
61
+ }
62
+
63
+
43
64
Properties localProperties = new Properties ()
44
65
localProperties. load(project. rootProject. file(" local.properties" ). newDataInputStream())
45
66
def sdkDir = localProperties. getProperty(" sdk.dir" )
You can’t perform that action at this time.
0 commit comments