Subversion Repositories tpanel

Rev

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

Rev Author Line No. Line
446 andreas 1
buildscript {
2
    repositories {
3
        google()
4
        mavenCentral()
5
    }
6
 
7
    dependencies {
483 andreas 8
        classpath 'com.android.tools.build:gradle:8.6.0'
446 andreas 9
    }
10
}
11
 
12
repositories {
13
    google()
14
    mavenCentral()
15
}
16
 
483 andreas 17
//apply plugin: 'com.android.application'
18
apply plugin: qtGradlePluginType
446 andreas 19
 
20
dependencies {
21
    implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
22
//    implementation 'com.google.android.material:material:1.0.0'
483 andreas 23
    implementation 'androidx.core:core:1.13.1'
24
//    implementation 'androidx.preference:preference:1.1.0'
446 andreas 25
}
26
 
27
android {
28
    /*******************************************************
29
     * The following variables:
30
     * - androidBuildToolsVersion,
31
     * - androidCompileSdkVersion
32
     * - qt5AndroidDir - holds the path to qt android files
33
     *                   needed to build any Qt application
34
     *                   on Android.
35
     *
36
     * are defined in gradle.properties file. This file is
37
     * updated by QtCreator and androiddeployqt tools.
38
     * Changing them manually might break the compilation!
39
     *******************************************************/
40
 
483 andreas 41
 
42
    namespace androidPackageName
446 andreas 43
    compileSdkVersion androidCompileSdkVersion
44
    buildToolsVersion androidBuildToolsVersion    /* Reserved for Qt 6.x */
45
    ndkVersion androidNdkVersion                  /* Reserved for Qt 6.x */
46
 
47
    // Extract native libraries from the APK
48
    packagingOptions.jniLibs.useLegacyPackaging true  /* Reserved for Qt 6.x */
49
 
50
    sourceSets {
51
        main {
52
            manifest.srcFile 'AndroidManifest.xml'
53
            java.srcDirs = [qtAndroidDir + '/src', 'src', 'java']
54
            aidl.srcDirs = [qtAndroidDir + '/src', 'src', 'aidl']
55
            res.srcDirs = [qtAndroidDir + '/res', 'res']
56
            resources.srcDirs = ['resources', 'ressources', 'res']
57
            renderscript.srcDirs = ['src']
58
            assets.srcDirs = ['assets']
59
            jniLibs.srcDirs = ['libs']
60
       }
61
    }
62
 
63
    tasks.withType(JavaCompile) {
64
        options.incremental = true
65
    }
66
 
67
    compileOptions {
68
        sourceCompatibility JavaVersion.VERSION_1_8
69
        targetCompatibility JavaVersion.VERSION_1_8
70
    }
71
 
72
    lintOptions {
73
        abortOnError false
74
    }
75
 
76
    // Do not compress Qt binary resources file
77
    aaptOptions {
78
        noCompress 'rcc'
79
    }
80
 
81
    defaultConfig {
82
        resConfig "en"
83
        minSdkVersion = qtMinSdkVersion
84
        targetSdkVersion = qtTargetSdkVersion
85
        ndk.abiFilters = qtTargetAbiList.split(",")
483 andreas 86
        qtMinSdkVersion = 30
87
        qtTargetSdkVersion = 33
446 andreas 88
        qtTargetAbiList = [ 'arm64-v8a', 'x86_64', 'armeabi-v7a', 'x86' ]
89
    }
90
 
91
    packagingOptions {
92
        doNotStrip '*/mips/*.so'
93
        doNotStrip '*/mips64/*.so'
94
        doNotStrip '*/armeabi-v7a/*.so'
95
        doNotStrip '*/arm64-v8a/*.so'
96
        doNotStrip '*/i686/*.so'
97
        doNotStrip '*/x86/*.so'
98
        doNotStrip '*/x86_64/*.so'
99
    }
100
}