build.gradle
3.09 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
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
115
116
117
118
119
120
121
122
123
124
125
apply plugin: 'com.android.application'
def buildType = "debug"
def androidABI = System.getenv('TARGET')
def daliDir = System.getenv('DALI_DIR')
def daliEnvDir = System.getenv('DALI_ENV_DIR')
def daliEnvLibDir = daliEnvDir + '/lib'
def daliEnvFilesDir = daliEnvDir + '/files'
android {
namespace = "com.sec.dalidemo"
signingConfigs {
config {
storeFile file("../key.jks")
storePassword "Samsung"
keyAlias "key0"
keyPassword "Samsung"
}
}
compileSdkVersion 30
defaultConfig {
applicationId = 'com.sec.dalidemo'
minSdkVersion 26
targetSdkVersion 30
versionCode 1
versionName "1.0"
externalNativeBuild {
cmake {
cppFlags "-fexceptions -frtti -w -Wall -std=c++17"
arguments '-DANDROID_STL=c++_shared'
}
}
}
aaptOptions {
noCompress ''
}
buildTypes {
debug {
ndk {
abiFilters androidABI
}
buildType = "debug"
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
ndk {
abiFilters androidABI
}
signingConfig signingConfigs.config
buildType = "release"
}
}
packagingOptions {
if( androidABI == "arm64-v8a" )
{
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libdaliview.so'
}
else
{
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libdaliview.so'
}
}
sourceSets {
main {
jniLibs.srcDirs += daliEnvLibDir
assets.srcDirs += daliEnvFilesDir
}
}
lintOptions {
checkReleaseBuilds false
}
externalNativeBuild {
cmake {
version '3.22.1'
path 'src/main/cpp/CMakeLists.txt'
}
}
compileOptions {
targetCompatibility = 1.8
sourceCompatibility = 1.8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
}
task buildDaliDependencies(type:Exec) {
environment "PREFIX", daliEnvDir
environment "ANDROID_ABI", androidABI
environment "ANDROID_PLATFORM", "latest"
if (buildType == 'debug')
environment "DEBUG", "1"
workingDir file(daliDir + '/android-dependencies/cmake').getAbsolutePath()
commandLine 'sh', './buildall.sh'
}
task buildDali(type:Exec) {
workingDir "../dali"
if (buildType == 'debug')
environment "DEBUG", "1"
commandLine 'sh', './build.sh'
}
task cleanDali(type:Exec) {
workingDir "../dali"
commandLine 'sh', './build.sh', 'clean'
}
tasks.withType(JavaCompile) {
options.deprecation = true
}
buildDali.dependsOn buildDaliDependencies
preBuild.dependsOn buildDali
clean.dependsOn cleanDali