-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
build.gradle
114 lines (98 loc) · 5.05 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
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
See the NOTICE file distributed with this work for additional
information regarding copyright ownership.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
*
*
*/
apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'META-INF/native-image/**/**.json'
exclude 'META-INF/native-image/*.json'
pickFirst 'nd4j-native.properties'
}
defaultConfig {
compileSdkVersion 30
applicationId "com.example.androidDl4jClassifier"
minSdkVersion 30
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
configurations {
javacpp
}
task javacppExtract(type: Copy) {
dependsOn configurations.javacpp
from { configurations.javacpp.collect { zipTree(it) } }
include "lib/**"
into "$buildDir/javacpp/"
android.sourceSets.main.jniLibs.srcDirs += ["$buildDir/javacpp/lib/"]
tasks.getByName('preBuild').dependsOn javacppExtract
}
dependencies {
def dl4jVersion = '1.0.0-M2'
def openblasVersion = '0.3.19-1.5.7'
def opencvVersion = '4.5.5-1.5.7'
def leptonicaVersion = '1.82.0-1.5.7'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation(group: 'org.deeplearning4j', name: 'deeplearning4j-core', version: dl4jVersion) {
exclude group: 'org.bytedeco', module: 'opencv-platform'
exclude group: 'org.bytedeco', module: 'leptonica-platform'
exclude group: 'org.bytedeco', module: 'hdf5-platform'
exclude group: 'org.nd4j', module: 'nd4j-base64'
exclude group: 'org.nd4j', module: 'nd4j-api'
}
implementation group: 'org.nd4j', name: 'nd4j-native', version: dl4jVersion
implementation group: 'org.nd4j', name: 'nd4j-native', version: dl4jVersion, classifier: "android-arm"
implementation group: 'org.nd4j', name: 'nd4j-native', version: dl4jVersion, classifier: "android-arm64"
implementation group: 'org.nd4j', name: 'nd4j-native', version: dl4jVersion, classifier: "android-x86"
implementation group: 'org.nd4j', name: 'nd4j-native', version: dl4jVersion, classifier: "android-x86_64"
implementation group: 'org.bytedeco', name: 'openblas', version: openblasVersion
implementation group: 'org.bytedeco', name: 'openblas', version: openblasVersion, classifier: "android-arm"
implementation group: 'org.bytedeco', name: 'openblas', version: openblasVersion, classifier: "android-arm64"
implementation group: 'org.bytedeco', name: 'openblas', version: openblasVersion, classifier: "android-x86"
implementation group: 'org.bytedeco', name: 'openblas', version: openblasVersion, classifier: "android-x86_64"
implementation group: 'org.bytedeco', name: 'opencv', version: opencvVersion
implementation group: 'org.bytedeco', name: 'opencv', version: opencvVersion, classifier: "android-arm"
implementation group: 'org.bytedeco', name: 'opencv', version: opencvVersion, classifier: "android-arm64"
implementation group: 'org.bytedeco', name: 'opencv', version: opencvVersion, classifier: "android-x86"
implementation group: 'org.bytedeco', name: 'opencv', version: opencvVersion, classifier: "android-x86_64"
implementation group: 'org.bytedeco', name: 'leptonica', version: leptonicaVersion
implementation group: 'org.bytedeco', name: 'leptonica', version: leptonicaVersion, classifier: "android-arm"
implementation group: 'org.bytedeco', name: 'leptonica', version: leptonicaVersion, classifier: "android-arm64"
implementation group: 'org.bytedeco', name: 'leptonica', version: leptonicaVersion, classifier: "android-x86"
implementation group: 'org.bytedeco', name: 'leptonica', version: leptonicaVersion, classifier: "android-x86_64"
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.4'
}