Skip to content

Commit 6b402c9

Browse files
committed
Fix support for latest versions and commits (#6.0.0)
1 parent f753b75 commit 6b402c9

File tree

23 files changed

+7734
-228
lines changed

23 files changed

+7734
-228
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.buckconfig

Lines changed: 0 additions & 6 deletions
This file was deleted.

.flowconfig

Lines changed: 0 additions & 47 deletions
This file was deleted.

.watchmanconfig

Lines changed: 0 additions & 1 deletion
This file was deleted.

App.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
* @flow
5+
*/
6+
7+
import React, { Component } from 'react';
8+
import {
9+
Platform,
10+
StyleSheet,
11+
Text,
12+
View
13+
} from 'react-native';
14+
15+
const instructions = Platform.select({
16+
ios: 'Press Cmd+R to reload,\n' +
17+
'Cmd+D or shake for dev menu',
18+
android: 'Double tap R on your keyboard to reload,\n' +
19+
'Shake or press menu button for dev menu',
20+
});
21+
22+
export default class App extends Component<{}> {
23+
render() {
24+
return (
25+
<View style={styles.container}>
26+
<Text style={styles.welcome}>
27+
Welcome to React Native!
28+
</Text>
29+
<Text style={styles.instructions}>
30+
To get started, edit App.js
31+
</Text>
32+
<Text style={styles.instructions}>
33+
{instructions}
34+
</Text>
35+
</View>
36+
);
37+
}
38+
}
39+
40+
const styles = StyleSheet.create({
41+
container: {
42+
flex: 1,
43+
justifyContent: 'center',
44+
alignItems: 'center',
45+
backgroundColor: '#F5FCFF',
46+
},
47+
welcome: {
48+
fontSize: 20,
49+
textAlign: 'center',
50+
margin: 10,
51+
},
52+
instructions: {
53+
textAlign: 'center',
54+
color: '#333333',
55+
marginBottom: 5,
56+
},
57+
});

__tests__/App.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import 'react-native';
2+
import React from 'react';
3+
import App from '../App';
4+
5+
// Note: test renderer must be required after react-native.
6+
import renderer from 'react-test-renderer';
7+
8+
it('renders correctly', () => {
9+
const tree = renderer.create(
10+
<App />
11+
);
12+
});

android/SvgExample.iml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.id="SvgExample" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="java-gradle" name="Java-Gradle">
5+
<configuration>
6+
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
7+
<option name="BUILDABLE" value="false" />
8+
</configuration>
9+
</facet>
10+
</component>
11+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
12+
<exclude-output />
13+
<content url="file://$MODULE_DIR$">
14+
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
15+
</content>
16+
<orderEntry type="inheritedJdk" />
17+
<orderEntry type="sourceFolder" forTests="false" />
18+
</component>
19+
</module>

android/app/build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ import com.android.build.OutputFile
7272
* ]
7373
*/
7474

75+
project.ext.react = [
76+
entryFile: "index.js"
77+
]
78+
7579
apply from: "../../node_modules/react-native/react.gradle"
7680

7781
/**
@@ -90,13 +94,13 @@ def enableSeparateBuildPerCPUArchitecture = false
9094
def enableProguardInReleaseBuilds = false
9195

9296
android {
93-
compileSdkVersion 23
94-
buildToolsVersion "23.0.1"
97+
compileSdkVersion 25
98+
buildToolsVersion '25.0.3'
9599

96100
defaultConfig {
97101
applicationId "com.svgexample"
98102
minSdkVersion 16
99-
targetSdkVersion 22
103+
targetSdkVersion 25
100104
versionCode 1
101105
versionName "1.0"
102106
ndk {
@@ -135,7 +139,7 @@ android {
135139
dependencies {
136140
compile project(':react-native-svg')
137141
compile fileTree(dir: "libs", include: ["*.jar"])
138-
compile "com.android.support:appcompat-v7:23.0.1"
142+
compile "com.android.support:appcompat-v7:25.3.1"
139143
compile "com.facebook.react:react-native:+" // From node_modules
140144
}
141145

android/app/react.gradle

Lines changed: 0 additions & 96 deletions
This file was deleted.

android/app/src/main/java/com/svgexample/MainApplication.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ protected List<ReactPackage> getPackages() {
2727
new SvgPackage()
2828
);
2929
}
30+
31+
@Override
32+
protected String getJSMainModuleName() {
33+
return "index";
34+
}
3035
};
3136

3237
@Override

0 commit comments

Comments
 (0)