Subversion Repositories tpanel

Rev

Rev 446 | Blame | Compare with Previous | Last modification | View Log | RSS feed

buildscript {
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.6.0'
    }
}

repositories {
    google()
    mavenCentral()
}

//apply plugin: 'com.android.application'
apply plugin: qtGradlePluginType

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
//    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.core:core:1.13.1'
//    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!
     *******************************************************/


    namespace androidPackageName
    compileSdkVersion androidCompileSdkVersion
    buildToolsVersion androidBuildToolsVersion    /* Reserved for Qt 6.x */
    ndkVersion androidNdkVersion                  /* Reserved for Qt 6.x */

    // 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 = 30
        qtTargetSdkVersion = 33
        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'
    }
}