build.gradle
1.61 KB
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
group 'com.wxwork.flutter_wxwork'
version '1.0'
buildscript {
repositories {
google()
mavenCentral()
// maven {
// url uri('libs')
// }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
}
}
// 定义一个方法, 用于获取当前moudle的dir
def getCurrentProjectDir() {
String result = ""
rootProject.allprojects { project ->
if (project.properties.get("identityPath").toString() == ":flutter_wxwork") {
result = project.properties.get("projectDir").toString()
}
}
return result
}
rootProject.allprojects {
def dir = getCurrentProjectDir()
repositories {
google()
mavenCentral()
maven { // 添加这个指向本地的仓库目录
url "$dir/aar"
}
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 31
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion 16
}
dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.0.0'
implementation "com.tecent:sdk:2.0.12"
}
testOptions {
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen { false }
showStandardStreams = true
}
}
}
}
// dependencies {
// implementation fileTree(include: ['*.aar'], dir: 'libs')
// }