Browse Source

android compiles

Daniel Zlotin 7 years ago
parent
commit
780944acc3

+ 2
- 2
android/app/build.gradle View File

47
 dependencies {
47
 dependencies {
48
     compile fileTree(dir: "libs", include: ["*.jar"])
48
     compile fileTree(dir: "libs", include: ["*.jar"])
49
 
49
 
50
-    compile 'com.android.support:design:25.0.1'
51
-    compile "com.android.support:appcompat-v7:25.0.1"
50
+    compile 'com.android.support:design:25.1.1'
51
+    compile "com.android.support:appcompat-v7:25.1.1"
52
 
52
 
53
     // node_modules
53
     // node_modules
54
     compile "com.facebook.react:react-native:+"
54
     compile "com.facebook.react:react-native:+"

+ 20
- 0
android/app/src/test/java/com/reactnativenavigation/EnvironmentTest.java View File

1
 package com.reactnativenavigation;
1
 package com.reactnativenavigation;
2
 
2
 
3
+import android.support.design.widget.FloatingActionButton;
4
+import android.support.v7.app.AppCompatActivity;
5
+
6
+import com.facebook.react.common.ReactConstants;
7
+
3
 import org.junit.Test;
8
 import org.junit.Test;
4
 import org.junit.runner.RunWith;
9
 import org.junit.runner.RunWith;
5
 import org.robolectric.RobolectricTestRunner;
10
 import org.robolectric.RobolectricTestRunner;
12
     public void assertJ() {
17
     public void assertJ() {
13
         assertThat(1 + 2).isEqualTo(3).isGreaterThan(2).isLessThan(4).isNotNegative().isPositive().isNotZero();
18
         assertThat(1 + 2).isEqualTo(3).isGreaterThan(2).isLessThan(4).isNotNegative().isPositive().isNotZero();
14
     }
19
     }
20
+
21
+    @Test
22
+    public void react() {
23
+        assertThat(ReactConstants.TAG).isNotEmpty();
24
+    }
25
+
26
+    @Test
27
+    public void supportV7AppCompat() {
28
+        assertThat(AppCompatActivity.class).isNotNull();
29
+    }
30
+
31
+    @Test
32
+    public void supportDesign() {
33
+        assertThat(FloatingActionButton.class).isNotNull();
34
+    }
15
 }
35
 }

+ 0
- 2
android/gradle.properties View File

16
 # This option should only be used with decoupled projects. More details, visit
16
 # This option should only be used with decoupled projects. More details, visit
17
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
 # org.gradle.parallel=true
18
 # org.gradle.parallel=true
19
-
20
-android.useDeprecatedNdk=true

BIN
android/gradle/wrapper/gradle-wrapper.jar View File


+ 1
- 1
android/gradle/wrapper/gradle-wrapper.properties View File

1
-#Mon Sep 12 16:05:44 IDT 2016
1
+#Mon Dec 28 10:00:20 PST 2015
2
 distributionBase=GRADLE_USER_HOME
2
 distributionBase=GRADLE_USER_HOME
3
 distributionPath=wrapper/dists
3
 distributionPath=wrapper/dists
4
 zipStoreBase=GRADLE_USER_HOME
4
 zipStoreBase=GRADLE_USER_HOME

+ 21
- 25
android/gradlew View File

6
 ##
6
 ##
7
 ##############################################################################
7
 ##############################################################################
8
 
8
 
9
-# Attempt to set APP_HOME
10
-# Resolve links: $0 may be a link
11
-PRG="$0"
12
-# Need this for relative symlinks.
13
-while [ -h "$PRG" ] ; do
14
-    ls=`ls -ld "$PRG"`
15
-    link=`expr "$ls" : '.*-> \(.*\)$'`
16
-    if expr "$link" : '/.*' > /dev/null; then
17
-        PRG="$link"
18
-    else
19
-        PRG=`dirname "$PRG"`"/$link"
20
-    fi
21
-done
22
-SAVED="`pwd`"
23
-cd "`dirname \"$PRG\"`/" >/dev/null
24
-APP_HOME="`pwd -P`"
25
-cd "$SAVED" >/dev/null
9
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10
+DEFAULT_JVM_OPTS=""
26
 
11
 
27
 APP_NAME="Gradle"
12
 APP_NAME="Gradle"
28
 APP_BASE_NAME=`basename "$0"`
13
 APP_BASE_NAME=`basename "$0"`
29
 
14
 
30
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31
-DEFAULT_JVM_OPTS=""
32
-
33
 # Use the maximum available, or set MAX_FD != -1 to use that value.
15
 # Use the maximum available, or set MAX_FD != -1 to use that value.
34
 MAX_FD="maximum"
16
 MAX_FD="maximum"
35
 
17
 
48
 cygwin=false
30
 cygwin=false
49
 msys=false
31
 msys=false
50
 darwin=false
32
 darwin=false
51
-nonstop=false
52
 case "`uname`" in
33
 case "`uname`" in
53
   CYGWIN* )
34
   CYGWIN* )
54
     cygwin=true
35
     cygwin=true
59
   MINGW* )
40
   MINGW* )
60
     msys=true
41
     msys=true
61
     ;;
42
     ;;
62
-  NONSTOP* )
63
-    nonstop=true
64
-    ;;
65
 esac
43
 esac
66
 
44
 
45
+# Attempt to set APP_HOME
46
+# Resolve links: $0 may be a link
47
+PRG="$0"
48
+# Need this for relative symlinks.
49
+while [ -h "$PRG" ] ; do
50
+    ls=`ls -ld "$PRG"`
51
+    link=`expr "$ls" : '.*-> \(.*\)$'`
52
+    if expr "$link" : '/.*' > /dev/null; then
53
+        PRG="$link"
54
+    else
55
+        PRG=`dirname "$PRG"`"/$link"
56
+    fi
57
+done
58
+SAVED="`pwd`"
59
+cd "`dirname \"$PRG\"`/" >/dev/null
60
+APP_HOME="`pwd -P`"
61
+cd "$SAVED" >/dev/null
62
+
67
 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
63
 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68
 
64
 
69
 # Determine the Java command to use to start the JVM.
65
 # Determine the Java command to use to start the JVM.
89
 fi
85
 fi
90
 
86
 
91
 # Increase the maximum file descriptors if we can.
87
 # Increase the maximum file descriptors if we can.
92
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
88
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
93
     MAX_FD_LIMIT=`ulimit -H -n`
89
     MAX_FD_LIMIT=`ulimit -H -n`
94
     if [ $? -eq 0 ] ; then
90
     if [ $? -eq 0 ] ; then
95
         if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
91
         if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then

+ 4
- 4
android/gradlew.bat View File

8
 @rem Set local scope for the variables with windows NT shell
8
 @rem Set local scope for the variables with windows NT shell
9
 if "%OS%"=="Windows_NT" setlocal
9
 if "%OS%"=="Windows_NT" setlocal
10
 
10
 
11
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12
+set DEFAULT_JVM_OPTS=
13
+
11
 set DIRNAME=%~dp0
14
 set DIRNAME=%~dp0
12
 if "%DIRNAME%" == "" set DIRNAME=.
15
 if "%DIRNAME%" == "" set DIRNAME=.
13
 set APP_BASE_NAME=%~n0
16
 set APP_BASE_NAME=%~n0
14
 set APP_HOME=%DIRNAME%
17
 set APP_HOME=%DIRNAME%
15
 
18
 
16
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17
-set DEFAULT_JVM_OPTS=
18
-
19
 @rem Find java.exe
19
 @rem Find java.exe
20
 if defined JAVA_HOME goto findJavaFromJavaHome
20
 if defined JAVA_HOME goto findJavaFromJavaHome
21
 
21
 
46
 goto fail
46
 goto fail
47
 
47
 
48
 :init
48
 :init
49
-@rem Get command-line arguments, handling Windows variants
49
+@rem Get command-line arguments, handling Windowz variants
50
 
50
 
51
 if not "%OS%" == "Windows_NT" goto win9xME_args
51
 if not "%OS%" == "Windows_NT" goto win9xME_args
52
 if "%@eval[2+2]" == "4" goto 4NT_args
52
 if "%@eval[2+2]" == "4" goto 4NT_args

+ 1
- 1
android/prepare-robolectric.gradle View File

1
-def robolectricDependenciesFolder = rootProject.buildDir.path + "/robolectric-dependencies"
1
+def robolectricDependenciesFolder = new File(gradle.gradleUserHomeDir, "/robolectric-dependencies-3.2.2")
2
 
2
 
3
 configurations.create('robolectricRuntime')
3
 configurations.create('robolectricRuntime')
4
 
4
 

+ 1
- 31
playground/android/app/build.gradle View File

6
     buildToolsVersion "25.0.2"
6
     buildToolsVersion "25.0.2"
7
 
7
 
8
     defaultConfig {
8
     defaultConfig {
9
-        applicationId "com.example"
9
+        applicationId "com.reactnativenavigation.playground"
10
         minSdkVersion 16
10
         minSdkVersion 16
11
         targetSdkVersion 25
11
         targetSdkVersion 25
12
         versionCode 1
12
         versionCode 1
13
         versionName "1.0"
13
         versionName "1.0"
14
-        ndk {
15
-            abiFilters "armeabi-v7a", "x86"
16
-        }
17
-    }
18
-    splits {
19
-        abi {
20
-            reset()
21
-            enable false
22
-            universalApk false  // If true, also generate a universal APK
23
-            include "armeabi-v7a", "x86"
24
-        }
25
-    }
26
-    buildTypes {
27
-        release {
28
-            minifyEnabled false
29
-            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
30
-        }
31
-    }
32
-    // applicationVariants are e.g. debug, release
33
-    applicationVariants.all { variant ->
34
-        variant.outputs.each { output ->
35
-            // For each separate APK per architecture, set a unique version code as described here:
36
-            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
37
-            def versionCodes = ["armeabi-v7a": 1, "x86": 2]
38
-            def abi = output.getFilter(OutputFile.ABI)
39
-            if (abi != null) {  // null for the universal-debug, universal-release variants
40
-                output.versionCodeOverride =
41
-                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
42
-            }
43
-        }
44
     }
14
     }
45
 }
15
 }
46
 
16
 

+ 1
- 1
playground/android/app/src/main/res/values/strings.xml View File

1
 <resources>
1
 <resources>
2
-    <string name="app_name">example</string>
2
+    <string name="app_name">Playground</string>
3
 </resources>
3
 </resources>