This repository has been archived by the owner on Jan 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
74 lines (61 loc) · 2.6 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
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
// 考虑到命令行构建,优先使用访问速度较快的仓库镜像
// 但是有些较新的库,阿里云没更新过来,所以在Github Actions中禁用
if (System.getenv("CI") != "true") {
// https://developer.aliyun.com/mvn/guide
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
}
google()
mavenCentral()
}
dependencies {
// https://android.googlesource.com/platform/tools/build/
classpath 'com.android.tools.build:gradle:7.2.2'
// https://github.com/JetBrains/kotlin
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
/* Crashlytics */
// https://github.com/google/play-services-plugins/tree/master/google-services-plugin
classpath 'com.google.gms:google-services:4.3.13'
// https://github.com/firebase/firebase-android-sdk
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'
// 此库长时间未更新,已无法适配新的AGP。虽然有了修改库,但是感觉也是无法长期维护的
// A类和相关的Gradle配置不再起作用,仅作为开发笔记保留;现在在Wear OS显示开源库信息是用二维码指向依赖列表json的URL
// https://github.com/wurensen/gradle_plugin_android_aspectjx
//classpath 'io.github.wurensen:gradle-android-plugin-aspectjx:2.0.14'
// https://github.com/Leon406/AndResGuard
classpath 'io.github.leon406:AndResGuard-gradle-plugin:1.2.22.6'
}
}
// Task: dependencyUpdates
// https://github.com/ben-manes/gradle-versions-plugin
plugins {
id "com.github.ben-manes.versions" version "0.42.0"
}
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
if (System.getenv("CI") != "true") {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
}
}
// 在floss变体中过滤gms插件任务
// processFlossReleaseGoogleServices
tasks.whenTaskAdded {
if (['Google', 'Crashlytics'].any { e -> name.contains(e) }) {
logger.lifecycle "G task -> $name"
if (name.contains('floss'.capitalize())) {
System.err.println "Skip G task for floss: $name"
enabled = false
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}