This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
/
build.gradle
89 lines (75 loc) · 2.86 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
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.project"
minSdkVersion 24
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// include libs folder .so files in apk
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
splits {
abi {
// Enables building multiple APKs per ABI.
enable true
// By default all ABIs are included, so use reset() and include to specify that we only
// want APKs for x86 and x86_64.
// Resets the list of ABIs that Gradle should create APKs for to none.
reset()
// Specifies a list of ABIs that Gradle should create APKs for.
include "arm64-v8a"//, "armeabi-v7a"
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
universalApk false
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// ndk build is great, but the files aren't getting put in the lib folders....
// DO NOT, I REPEAT, DO NOT USE NDK BUILD IN GRADLE -> THIS IS COMMENTED FOR A REASON
// IT WILL COMPILE EVERY TIME YOU BUILD YOUR APK AND WASTE CPU / DISK SPACE
// USE build-release.bat ON THE COMMANDLINE WHENEVER YOU NEED TO NDK BUILD
// If you know a solution to this problem, let me know
/*ndk {
abiFilters 'arm64-v8a'//, 'armeabi-v7a'
}
externalNativeBuild {
ndkBuild {
arguments "--directory=$projectDir/jni"
//targets 'MagickCore-7'
}
}*/
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
// externalNativeBuild {
// ndkBuild {
// path 'jni/Android.mk'
// }
// }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'com.github.GrenderG:Toasty:1.4.2'
//noinspection GradleDependency
implementation 'pub.devrel:easypermissions:2.0.1'
implementation 'commons-io:commons-io:2.6'
implementation 'org.apache.commons:commons-text:1.7'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}