Subversion Repositories tpanel

Rev

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