]> gitweb.fperrin.net Git - Dictionary.git/blob - build.gradle
Switch to app compat preferences.
[Dictionary.git] / build.gradle
1 buildscript {
2     repositories {
3         jcenter()
4         google()
5     }
6     dependencies {
7         classpath 'com.android.tools.build:gradle:3.6.2'
8     }
9 }
10
11 apply plugin: 'com.android.application'
12
13 repositories {
14     jcenter()
15     google()
16 }
17 configurations {
18     smallicu
19 }
20 dependencies {
21     implementation 'com.android.support:appcompat-v7:25.3.1'
22     implementation 'com.android.support:design:25.3.1'
23     // Note: you can just replace "smallicu" by implementation
24     // and remove the "compile files" part if you do not
25     // care about the size of the apk
26     smallicu 'com.ibm.icu:icu4j:57.1'
27     implementation files("$buildDir/icu4j-57.1.small.jar") {
28         builtBy 'makesmallicu'
29     }
30     implementation 'com.android.support:preference-v7:25.3.1'
31 }
32
33 task makesmallicu (type:Exec, dependsOn: configurations.smallicu) {
34     inputs.file "mksmallicu.sh"
35     inputs.file "${configurations.smallicu.resolve()[0]}"
36     outputs.dir "$buildDir"
37     outputs.file "$buildDir/icu4j-57.1.small.jar"
38     // necessary due to gradle bug: GRADLE-2638
39     new File("$buildDir").mkdirs()
40     commandLine "./mksmallicu.sh", "${configurations.smallicu.resolve()[0]}", "$buildDir/icu4j-57.1.small.jar"
41 }
42
43 def utildir = hasProperty("quickdicUtilDir") ? quickdicUtilDir : "Util"
44
45 allprojects {
46     tasks.withType(JavaCompile) {
47         options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
48     }
49 }
50
51 android {
52     compileSdkVersion 29
53     lintOptions {
54         disable "MissingTranslation"
55     }
56     buildTypes {
57         debug {
58             applicationIdSuffix ".debug"
59         }
60         release {
61             minifyEnabled true
62             shrinkResources true
63         }
64     }
65     sourceSets {
66         main {
67             manifest.srcFile 'AndroidManifest.xml'
68             java.srcDirs = ['src', utildir + "/src"]
69             res.srcDirs = ['res']
70             assets.srcDirs = ['assets']
71         }
72
73         // Move the build types to build-types/<type>
74         // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
75         // This moves them out of them default location under src/<type>/... which would
76         // conflict with src/ being used by the main source set.
77         // Adding new build types or product flavors should be accompanied
78         // by a similar customization.
79         debug.setRoot('build-types/debug')
80         release.setRoot('build-types/release')
81     }
82     defaultConfig {
83         applicationId 'de.reimardoeffinger.quickdic'
84         targetSdkVersion 29
85         resConfigs "de", "es", "eu", "fr", "it", "ja", "pt", "pt-rBR", "ru", "zh-rCN"
86         minSdkVersion 10
87     }
88 }