Skip to content

Commit 90834f6

Browse files
committed
'地图制作功能更'
2 parents ad156ca + df9df7b commit 90834f6

28 files changed

Lines changed: 1252 additions & 722 deletions

File tree

‎android/app/build.gradle‎

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
apply plugin: "com.android.application"
2+
3+
import com.android.build.OutputFile
4+
5+
/**
6+
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7+
* and bundleReleaseJsAndAssets).
8+
* These basically call `react-native bundle` with the correct arguments during the Android build
9+
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10+
* bundle directly from the development server. Below you can see all the possible configurations
11+
* and their defaults. If you decide to add a configuration block, make sure to add it before the
12+
* `apply from: "../../node_modules/react-native/react.gradle"` line.
13+
*
14+
* project.ext.react = [
15+
* // the name of the generated asset file containing your JS bundle
16+
* bundleAssetName: "index.android.bundle",
17+
*
18+
* // the entry file for bundle generation
19+
* entryFile: "index.android.js",
20+
*
21+
* // whether to bundle JS and assets in debug mode
22+
* bundleInDebug: false,
23+
*
24+
* // whether to bundle JS and assets in release mode
25+
* bundleInRelease: true,
26+
*
27+
* // whether to bundle JS and assets in another build variant (if configured).
28+
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29+
* // The configuration property can be in the following formats
30+
* // 'bundleIn${productFlavor}${buildType}'
31+
* // 'bundleIn${buildType}'
32+
* // bundleInFreeDebug: true,
33+
* // bundleInPaidRelease: true,
34+
* // bundleInBeta: true,
35+
*
36+
* // whether to disable dev mode in custom build variants (by default only disabled in release)
37+
* // for example: to disable dev mode in the staging build type (if configured)
38+
* devDisabledInStaging: true,
39+
* // The configuration property can be in the following formats
40+
* // 'devDisabledIn${productFlavor}${buildType}'
41+
* // 'devDisabledIn${buildType}'
42+
*
43+
* // the root of your project, i.e. where "package.json" lives
44+
* root: "../../",
45+
*
46+
* // where to put the JS bundle asset in debug mode
47+
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
48+
*
49+
* // where to put the JS bundle asset in release mode
50+
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
51+
*
52+
* // where to put drawable resources / React Native assets, e.g. the ones you use via
53+
* // require('./image.png')), in debug mode
54+
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
55+
*
56+
* // where to put drawable resources / React Native assets, e.g. the ones you use via
57+
* // require('./image.png')), in release mode
58+
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
59+
*
60+
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
61+
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
62+
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
63+
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
64+
* // for example, you might want to remove it from here.
65+
* inputExcludes: ["android/**", "ios/**"],
66+
*
67+
* // override which node gets called and with what additional arguments
68+
* nodeExecutableAndArgs: ["node"],
69+
*
70+
* // supply additional arguments to the packager
71+
* extraPackagerArgs: []
72+
* ]
73+
*/
74+
75+
project.ext.react = [
76+
entryFile: "index.js"
77+
]
78+
79+
apply from: "../../node_modules/react-native/react.gradle"
80+
81+
/**
82+
* Set this to true to create two separate APKs instead of one:
83+
* - An APK that only works on ARM devices
84+
* - An APK that only works on x86 devices
85+
* The advantage is the size of the APK is reduced by about 4MB.
86+
* Upload all the APKs to the Play Store and people will download
87+
* the correct one based on the CPU architecture of their device.
88+
*/
89+
def enableSeparateBuildPerCPUArchitecture = false
90+
91+
/**
92+
* Run Proguard to shrink the Java bytecode in release builds.
93+
*/
94+
def enableProguardInReleaseBuilds = false
95+
96+
android {
97+
signingConfigs {
98+
release_config {
99+
keyAlias 'supermap'
100+
keyPassword 'supermap321'
101+
storeFile file('../keystores/release.keystore')
102+
storePassword 'supermap123'
103+
}
104+
}
105+
compileSdkVersion 27
106+
buildToolsVersion "23.0.1"
107+
defaultConfig {
108+
applicationId "com.supermap.itablet"
109+
minSdkVersion 16
110+
targetSdkVersion 22
111+
versionCode 1
112+
versionName "1.0"
113+
ndk {
114+
abiFilters "armeabi-v7a"
115+
}
116+
}
117+
dexOptions {
118+
javaMaxHeapSize "4g"
119+
}
120+
splits {
121+
abi {
122+
reset()
123+
enable enableSeparateBuildPerCPUArchitecture
124+
universalApk false // If true, also generate a universal APK
125+
include "armeabi-v7a" //, "x86"
126+
}
127+
}
128+
buildTypes {
129+
release {
130+
minifyEnabled enableProguardInReleaseBuilds
131+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
132+
signingConfig signingConfigs.release_config
133+
}
134+
debug {
135+
signingConfig signingConfigs.release_config
136+
}
137+
}
138+
// applicationVariants are e.g. debug, release
139+
applicationVariants.all { variant ->
140+
variant.outputs.each { output ->
141+
// For each separate APK per architecture, set a unique version code as described here:
142+
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
143+
def versionCodes = ["armeabi-v7a": 1, "x86": 2]
144+
def abi = output.getFilter(OutputFile.ABI)
145+
if (abi != null) { // null for the universal-debug, universal-release variants
146+
output.versionCodeOverride =
147+
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
148+
}
149+
}
150+
}
151+
defaultConfig{ multiDexEnabled true}
152+
}
153+
154+
dependencies {
155+
compile project(':imobile_for_reactnative')
156+
compile fileTree(include: ['*.jar'], dir: 'libs')
157+
compile 'com.android.support:appcompat-v7:27.1.1'
158+
compile 'com.facebook.react:react-native:+'
159+
compile 'com.android.support.constraint:constraint-layout:1.0.2'
160+
compile 'com.android.support:multidex:1.0.0'
161+
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
162+
compile 'io.reactivex.rxjava2:rxjava:2.0.5'
163+
compile 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.3@aar'
164+
}
165+
166+
// Run this once to be able to run the application with BUCK
167+
// puts all compile dependencies into folder libs for BUCK to use
168+
task copyDownloadableDepsToLibs(type: Copy) {
169+
from configurations.compile
170+
into 'libs'
171+
}

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
<uses-permission android:name="android.permission.CAMERA" />
2020
<uses-permission android:name="android.permission.RECORD_AUDIO" />
2121

22-
<uses-sdk
23-
android:minSdkVersion="16"
24-
android:targetSdkVersion="22" />
22+
<uses-sdk android:targetSdkVersion="22" />
2523

2624
<application
2725
android:name=".MainApplication"
@@ -40,9 +38,9 @@
4038
<category android:name="android.intent.category.LAUNCHER" />
4139
</intent-filter>
4240
</activity>
43-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
41+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />supermap
42+
4443
<activity android:name="com.supermap.imb.appconfig.StartupActivity"></activity>
45-
<activity android:name="com.supermap.DataVisualization.VisualizationActivity"></activity>
4644
<activity android:name="com.tronzzb.sampleapp.activity.MapLayer"></activity>
4745
<meta-data
4846
android:name="TencentMapSDK"

‎android/build.gradle‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
repositories {
5+
jcenter()
6+
// maven {
7+
// url 'https://maven.google.com/'
8+
// name 'Google'
9+
// }
10+
maven {
11+
url 'https://maven.google.com/'
12+
name 'Google'
13+
}
14+
}
15+
dependencies {
16+
classpath 'com.android.tools.build:gradle:2.2.3'
17+
18+
// NOTE: Do not place your application dependencies here; they belong
19+
// in the individual module build.gradle files
20+
}
21+
}
22+
23+
allprojects {
24+
repositories {
25+
mavenLocal()
26+
jcenter()
27+
maven {
28+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
29+
url "$rootDir/../node_modules/react-native/android"
30+
}
31+
// maven {
32+
// url 'https://maven.google.com/'
33+
// name 'Google'
34+
// }
35+
maven {
36+
url 'https://maven.google.com/'
37+
name 'Google'
38+
}
39+
}
40+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri Oct 12 12:36:22 CST 2018
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip

‎android/gradlew.bat‎

Lines changed: 90 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)