This repository has been archived by the owner on Nov 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
56 lines (51 loc) · 1.87 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
apply plugin: 'com.android.library'
apply plugin: 'signing'
android {
compileSdkVersion 23
buildToolsVersion "24.0.0"
defaultConfig {
defaultPublishConfig 'release'
publishNonDefault true
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
ndk {
moduleName "DebuggableToolNative"
cFlags "-I" + project.projectDir.toString() + "/art/runtime -std=c++11"
ldLibs "art"
stl "gnustl_shared"
abiFilters "armeabi", "arm64-v8a"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//android.sourceSets.main.jni.srcDirs = []
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'eu.chainfire:libsuperuser:1.0.0.+'
compile "net.sf.jopt-simple:jopt-simple:4.5"
}
signing {
signatories = new name.kevinross.gradle.util.KeybaseSignatoryProvider()
sign configurations.archives
}
// the field we use as a fallback to check if a debugger has already attached is a private field
// make the field public in the header
task fixGRegistryVisibility << {
String header = new File(project.projectDir.toString() + "/art/runtime/debugger.h").text
if (header.indexOf("MADEPUBLIC") > 0) {
return
}
header = header.replace("// The registry mapping objects to JDWP ids.", "// The registry mapping objects to JDWP ids. MADEPUBLIC\npublic:")
header = header.replace("static ObjectRegistry* gRegistry;", "static ObjectRegistry* gRegistry;\nprivate:")
new File(project.projectDir.toString() + "/art/runtime/debugger.h").text = header
}
preBuild.dependsOn fixGRegistryVisibility