-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
101 lines (94 loc) · 3.55 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
97
98
99
100
101
// Top-level build file where you can add configuration options common to all sub-projects/modules.
// import com.hujiang.gradle.plugin.android.aspectjx.*;
buildscript {
// buildscript 中的代码会优先外面的代码执行
apply from: "configs.gradle"
ext.kotlin_version = '1.8.20'
repositories {
maven { url 'https://jitpack.io' }
// maven { url 'https://maven.aliyun.com/repository/public' }
// maven { url 'https://maven.aliyun.com/repository/central' }
// maven { url 'https://maven.aliyun.com/repository/google' }
// maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
google()
jcenter()
mavenCentral()
}
switch (environmentType) {
case EnvironmentType.TYPE_ASPECT:
dependencies {
classpath 'org.aspectj:aspectjtools:1.9.6'
classpath 'org.aspectj:aspectjweaver:1.9.6'
}
break
case EnvironmentType.TYPE_ASPECT_PLUGIN:
dependencies {
classpath "com.github.2017398956:AspectPlugin:${aspectPluginVersion}"
}
break
case EnvironmentType.TYPE_LOCAL_MAVEN:
repositories {
maven {
url uri('repo')
}
}
dependencies {
// classpath 'personal.nfl.permission:permissionPlugin:0.2.0'
}
break
case EnvironmentType.TYPE_ABC_PERMISSION_PLUGIN:
dependencies {
classpath "com.github.2017398956:AspectPlugin:${aspectPluginVersion}"
classpath "com.github.2017398956:abcpermission-plugin:${abcPermissionPluginVersion}"
}
break
case EnvironmentType.TYPE_HUJIANG:
dependencies {
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.10'
}
break
case EnvironmentType.TYPE_HUJIANG_LOCAL:
repositories {
maven {
url uri('gradle_plugin_android_aspectjx\\repo')
}
}
dependencies {
classpath 'personal.nfl.aspectj:gradle-android-plugin-aspectjx:0.0.3'
}
break
case EnvironmentType.TYPE_HUJIANG_LOCAL_JAR:
// 需要把 沪江 ajx 的 jar 包放在根目录的 plugins 文件夹下
dependencies {
classpath fileTree(dir:'plugins', include:['*.jar'])
}
break
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.2'
// classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'https://jitpack.io' }
// maven { url 'https://maven.aliyun.com/repository/public' }
// maven { url 'https://maven.aliyun.com/repository/central' }
// maven { url 'https://maven.aliyun.com/repository/google' }
// maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
google()
jcenter()
mavenCentral()
// 使用本地 maven 仓库 repo 时再添加
// maven {
// url uri('repo')
// }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}