-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
94 lines (85 loc) · 2.83 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
apply plugin: 'com.android.library'
apply plugin: 'maven'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
minifyEnabled false
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'monero-kit-proguard-rules.pro'
consumerProguardFile 'monero-kit-proguard-consumer-rules.pro'
}
}
lintOptions {
abortOnError false
}
sourceSets {
main {
jni.srcDirs = ['src/main/jni', 'src/main/jni/']
java.srcDirs = ['src/main/java', 'src/main/java/main/res']
jniLibs.srcDirs = ['libs']
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
def sdkAarName = 'WaterholeMoneroMiner_1.0'
def sourceAar = 'WaterholeMoneroMiner-release'
// 生成aar
task makeAar(type: Copy, dependsOn: build) {
from(project.buildDir.toString() + '/outputs/aar', project.buildDir.toString() + '/outputs/mapping/release')
into(rootProject.rootDir.toString() + '/releaseaar')
include(sourceAar + '.aar', 'mapping.txt')
rename(sourceAar, sdkAarName)
rename('mapping', sdkAarName + "-mapping")
}
// FindBugs 是一个静态分析工具,它检查类或者 JAR 文件,将字节码与一组缺陷模式进行对比以发现可能的问题
apply plugin: 'findbugs'
task customFindbugs(type: FindBugs) {
ignoreFailures = true
effort = "max"
reportLevel = "low"
classes = files("$project.buildDir/intermediates/classes")
source = fileTree('src/main/java/waterhole/miner/monero')
classpath = files()
reports {
xml.enabled = true
xml.withMessages = true
html.enabled = !xml.isEnabled()
xml.destination "$project.rootDir.absolutePath/reports/findbugs_WaterholeMoneroMiner.xml"
html.destination "$project.rootDir.absolutePath/reports/findbugs_WaterholeMoneroMiner.html"
}
}
artifacts {
archives file: file("${projectDir}/build/outputs/mapping/release/mapping.txt"), classifier: 'mapping', type: 'txt'
}
uploadArchives {
configuration = configurations.archives
repositories {
mavenDeployer {
snapshotRepository(url: MAVEN_REPO_SNAPSHOT_URL) {
authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
}
repository(url: MAVEN_REPO_RELEASE_URL) {
authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
}
pom.project {
version '1.0.0'
artifactId 'miner-xmr'
groupId GROUP_ID
packaging TYPE
description DESCRIPTION
}
}
}
}