forked from alibaba/GCanvas
-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle
96 lines (86 loc) · 3.03 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import groovy.json.JsonSlurper
// read the React-Native version of local app
def parseAppRnVersion() {
def inputFile = new File(rootDir, '../node_modules/react-native/package.json')
def json = new JsonSlurper().parseText(inputFile.text)
return json.version as String
}
def (appRnMajorVersion, appRnMinorVersion, appRnPatchVersion) = parseAppRnVersion().tokenize('.')
allprojects {
project.ext.id = "You Should Change It"
project.ext.meta = [:]
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
google()
maven {
url 'https://maven.google.com/'
}
mavenCentral()
}
configurations {
compileProject.extendsFrom compile, archives
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
google()
maven {
url 'https://maven.google.com/'
}
mavenCentral()
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.10'
classpath 'com.android.tools.build:gradle:3.3.0'
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3"
}
}
// task clean(type: Delete) {
// delete rootProject.buildDir
// }
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
ext {
localExtensions = [
sdks: [
'Gradle' : '3.0.1',
'CompileSDK' : safeExtGet('compileSdkVersion', Integer.parseInt(appRnMinorVersion) < 68 ? 30 : 31),
'BuildTool' : safeExtGet('buildToolsVersion', Integer.parseInt(appRnMinorVersion) < 68 ? '30.0.2' : '31.0.0'),
'MinSDK' : safeExtGet('minSdkVersion', 23),
'TargetSDK' : safeExtGet('targetSdkVersion', 30),
'Fresco' : '1.8.0',
'Picasso' : '2.5.2',
'JUnit' : '4.12',
'Support' : '26.0.2',
'Weex' : '0.26.0',
'WeexAnnotation': '1.3',
'ReactNative' : '+',
'ABIs' : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"],
'EXCLUDE_CPP_SHARED' : false
],
// PLEASE DO NOT MODIFY ARTIFACT IDS LIST BELOW.
// Group names
groups: [
'Main' : 'com.taobao.gcanvas',
'Bridge' : 'com.taobao.gcanvas.bridges',
'Adapter': 'com.taobao.gcanvas.adapters',
],
// Artifact IDs
artifacts: [
'BridgeSpec' : 'spec',
'Core' : 'gcanvas_library',
'WeexBridge' : 'weex',
'ReactNative' : 'rn',
'ImageAdapter' : 'img',
'FrescoAdapter' : 'img_fresco',
'PicassoAdapter': 'img_picasso',
]
]
}