plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
//Select whether you want to execute the compile arkts script.
def configBuildFlag = false
defaultConfig {
applicationId "com.huawei.music.musichome"
minSdkVersion 16
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
ndkVersion = "21.1.6352462"
abiFilters "arm64-v8a"
}
}
task ArkTSBuildTask {
preBuild.dependsOn ArkTSBuildTask
doLast {
if (configBuildFlag) {
def os = System.getProperty("os.name").toLowerCase()
if (os.contains("win")) {
exec {
commandLine 'cmd', '/c', '.\\buildArkTS'
workingDir file(project.projectDir.getAbsolutePath() + '\\..')
}
} else {
exec {
commandLine 'sh', '-c', 'chmod +x ./buildArkTS && ./buildArkTS'
workingDir file(project.projectDir.getAbsolutePath() + '/..')
}
}
}
}
}
buildTypes {
release {
signingConfig signingConfigs.debug
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
profile {
signingConfig signingConfigs.debug
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dynamicFeatures = []
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation files('libs\\arkui_android_adapter.jar')
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.media:media:1.4.3'
}