-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathrpx-config.gradle
72 lines (58 loc) · 3.5 KB
/
rpx-config.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
static def isWindows() {
return org.gradle.internal.os.OperatingSystem.current().isWindows()
// return System.properties['os.name'].contains('windows');
}
project.ext {
// 库group(多lib时,jitpack插件会自动将其变成 group.repoName,即com.github.GitLqr.RePluginX)
JITPACK_PLUGIN_GROUP = "com.github.GitLqr"
// maven 测试仓库的位置
TEST_MAVEN_DIR = isWindows() ? 'D:\\maven_repository' : '~/maven_repository'
TEST_PLUGIN_GROUP = "${JITPACK_PLUGIN_GROUP}.RePluginX" // 测试插件的 group
TEST_PLUGIN_VERSION = "test" // 测试插件的 version
TEST_MAVEN_ENABLE = false // 是否开启 maven 测试仓库(注意:开启后 jitpack 插件失效,只在本地测试时才开启)
TEST_PLUGIN_ENABLE = false // 是否开启 测试插件(控制是否使用本地测试插件,或是远端正式发布的插件)
// 统一版本
// AGP版本号,AndroidX 至少 3.2.0 起步;基于3.2.1,为了兼容低版本 AGP
android_build_tools_version = "3.2.1" // 4.1.1,3.5.3,3.2.1,2.3.3,
kotlin_version = '1.2.51' // 1.1.3
repluginx_version = 'v0.0.7'
support_version = '28.0.0'
androidx_version = '1.2.0'
androidExt = [
// "compileSdkVersion": 25,
// "buildToolsVersion": "25.0.2",
// "minSdkVersion" : 9,
// "targetSdkVersion" : 22,
"compileSdkVersion": 29, // AndroidX 至少 28 起步
"buildToolsVersion": "29.0.3",
"minSdkVersion" : 15, // AndroidX 至少 14 起步
"targetSdkVersion" : 29,
]
classpathExt = [
"android-build-tools" : "com.android.tools.build:gradle:${android_build_tools_version}",
"kotlin-gradle-plugin" : "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version",
"replugin-host-gradle" : "com.github.GitLqr.RePluginX:replugin-host-gradle:${TEST_PLUGIN_ENABLE ? TEST_PLUGIN_VERSION : repluginx_version}",
"replugin-plugin-gradle" : "com.github.GitLqr.RePluginX:replugin-plugin-gradle:${TEST_PLUGIN_ENABLE ? TEST_PLUGIN_VERSION : repluginx_version}",
"android-maven-gradle-plugin": "com.github.dcendents:android-maven-gradle-plugin:2.1"
]
dependenciesExt = [
"support-v4" : "com.android.support:support-v4:${support_version}",
"appcompat-v7" : "com.android.support:appcompat-v7:${support_version}",
"appcompat-androidx" : "androidx.appcompat:appcompat:${androidx_version}",
"localbroadcastmanager-androidx": "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0",
"kotlin-stdlib-jre7" : "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version",
"replugin-host-library" : "com.github.GitLqr.RePluginX:replugin-host-library:${TEST_PLUGIN_ENABLE ? TEST_PLUGIN_VERSION : repluginx_version}",
"replugin-plugin-library" : "com.github.GitLqr.RePluginX:replugin-plugin-library:${TEST_PLUGIN_ENABLE ? TEST_PLUGIN_VERSION : repluginx_version}"
]
// 统一仓库
repositoriesExt = {
// mavenLocal()
// MavenCentral 远程仓库:https://mvnrepository.com
mavenCentral()
// 阿里云云效仓库:https://maven.aliyun.com/mvn/guide
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
maven { url uri(TEST_MAVEN_DIR) }
}
}