git ssb

1+

Daan Patchwork / manyverse



Tree: ba5b3cdd8ec49357c247f4db8908801932759d43

Files: ba5b3cdd8ec49357c247f4db8908801932759d43 / android / app / build.gradle

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

Built with git-ssb-web