Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.1'
}
}
repositories {
google()
mavenCentral()
}
apply plugin: 'com.android.application'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
// implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.preference:preference:1.1.0'
}
android {
/*******************************************************
* The following variables:
* - androidBuildToolsVersion,
* - androidCompileSdkVersion
* - qt5AndroidDir - holds the path to qt android files
* needed to build any Qt application
* on Android.
*
* are defined in gradle.properties file. This file is
* updated by QtCreator and androiddeployqt tools.
* Changing them manually might break the compilation!
*******************************************************/
compileSdkVersion androidCompileSdkVersion
buildToolsVersion androidBuildToolsVersion /* Reserved for Qt 6.x */
ndkVersion androidNdkVersion /* Reserved for Qt 6.x */
// namespace 'org.qtproject.theosys'
// Extract native libraries from the APK
packagingOptions.jniLibs.useLegacyPackaging true /* Reserved for Qt 6.x */
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = [qtAndroidDir + '/src', 'src', 'java']
aidl.srcDirs = [qtAndroidDir + '/src', 'src', 'aidl']
res.srcDirs = [qtAndroidDir + '/res', 'res']
resources.srcDirs = ['resources', 'ressources', 'res']
renderscript.srcDirs = ['src']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
}
tasks.withType(JavaCompile) {
options.incremental = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
abortOnError false
}
// Do not compress Qt binary resources file
aaptOptions {
noCompress 'rcc'
}
defaultConfig {
resConfig "en"
minSdkVersion = qtMinSdkVersion
targetSdkVersion = qtTargetSdkVersion
ndk.abiFilters = qtTargetAbiList.split(",")
qtMinSdkVersion = 29
qtTargetSdkVersion = 30
qtTargetAbiList = [ 'arm64-v8a', 'x86_64', 'armeabi-v7a', 'x86' ]
}
packagingOptions {
doNotStrip '*/mips/*.so'
doNotStrip '*/mips64/*.so'
doNotStrip '*/armeabi-v7a/*.so'
doNotStrip '*/arm64-v8a/*.so'
doNotStrip '*/i686/*.so'
doNotStrip '*/x86/*.so'
doNotStrip '*/x86_64/*.so'
}
}