Skip to content

Commit e905a7c

Browse files
committed
modified example/app to be able to build and run the example from the command line
1 parent ac98fc6 commit e905a7c

File tree

8 files changed

+15
-10
lines changed

8 files changed

+15
-10
lines changed

example/android/app/.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-12/"/>
44
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
55
<classpathentry kind="output" path="bin/default"/>
66
</classpath>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=13
3+
org.eclipse.jdt.core.compiler.compliance=13
4+
org.eclipse.jdt.core.compiler.source=13

example/android/app/BUCK

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ android_library(
3535

3636
android_build_config(
3737
name = "build_config",
38-
package = "com.androidprogressbarexample",
38+
package = "com.androidprogressbar",
3939
)
4040

4141
android_resource(
4242
name = "res",
43-
package = "com.androidprogressbarexample",
43+
package = "com.androidprogressbar",
4444
res = "src/main/res",
4545
)
4646

example/android/app/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import com.android.build.OutputFile
7373
*/
7474

7575
project.ext.react = [
76-
entryFile: "example/index.js"
76+
entryFile: "index.js"
7777
]
7878

7979
apply from: "../../../node_modules/react-native/react.gradle"
@@ -102,7 +102,7 @@ android {
102102
}
103103

104104
defaultConfig {
105-
applicationId "com.androidprogressbarexample"
105+
applicationId "com.androidprogressbar"
106106
minSdkVersion rootProject.ext.minSdkVersion
107107
targetSdkVersion rootProject.ext.targetSdkVersion
108108
versionCode 1
@@ -141,7 +141,6 @@ dependencies {
141141
implementation fileTree(dir: "libs", include: ["*.jar"])
142142
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
143143
implementation "com.facebook.react:react-native:+" // From node_modules
144-
implementation project(':react-native-progress-bar-android')
145144
}
146145

147146
// Run this once to be able to run the application with BUCK

example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.androidprogressbarexample">
2+
package="com.androidprogressbar">
33

44
<uses-permission android:name="android.permission.INTERNET" />
55

example/android/app/src/main/java/com/androidprogressbarexample/MainActivity.java renamed to example/android/app/src/main/java/com/androidprogressbar/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.androidprogressbarexample;
1+
package com.androidprogressbar;
22

33
import com.facebook.react.ReactActivity;
44

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
"description": "React Native Android Progress Bar",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1",
8-
"start": "node node_modules/react-native/local-cli/cli.js start"
7+
"start": "node node_modules/react-native/local-cli/cli.js start",
8+
"start:android": "adb shell am start -n com.androidprogressbar/.MainActivity",
9+
"build:android": "cd example/android && ./gradlew installDebug && cd ../.. && npm run start:android",
10+
"test": "jest"
911
},
1012
"keywords": [
1113
"react-native",

0 commit comments

Comments
 (0)