]> gitweb.fperrin.net Git - Dictionary.git/blob - build.gradle
Allow to escape only unicode chars
[Dictionary.git] / build.gradle
1 buildscript {
2     repositories {
3         jcenter()
4         google()
5     }
6     dependencies {
7         classpath 'com.android.tools.build:gradle:4.1.1'
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     coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1'
32 }
33
34 task makesmallicu (type:Exec, dependsOn: configurations.smallicu) {
35     inputs.file "mksmallicu.sh"
36     inputs.file "${configurations.smallicu.resolve()[0]}"
37     outputs.dir "$buildDir"
38     outputs.file "$buildDir/icu4j-57.1.small.jar"
39     // necessary due to gradle bug: GRADLE-2638
40     new File("$buildDir").mkdirs()
41     commandLine "./mksmallicu.sh", "${configurations.smallicu.resolve()[0]}", "$buildDir/icu4j-57.1.small.jar"
42 }
43
44 def utildir = hasProperty("quickdicUtilDir") ? quickdicUtilDir : "Util"
45
46 allprojects {
47     tasks.withType(JavaCompile) {
48         options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
49     }
50 }
51
52 android {
53     compileSdkVersion 29
54     lintOptions {
55         disable "MissingTranslation"
56     }
57     buildTypes {
58         debug {
59             applicationIdSuffix ".debug"
60         }
61         release {
62             minifyEnabled true
63             shrinkResources true
64         }
65     }
66     sourceSets {
67         main {
68             manifest.srcFile 'AndroidManifest.xml'
69             java.srcDirs = ['src', utildir + "/src"]
70             res.srcDirs = ['res']
71             assets.srcDirs = ['assets']
72         }
73
74         // Move the build types to build-types/<type>
75         // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
76         // This moves them out of them default location under src/<type>/... which would
77         // conflict with src/ being used by the main source set.
78         // Adding new build types or product flavors should be accompanied
79         // by a similar customization.
80         debug.setRoot('build-types/debug')
81         release.setRoot('build-types/release')
82     }
83     defaultConfig {
84         applicationId 'de.reimardoeffinger.quickdic'
85         multiDexEnabled true
86         targetSdkVersion 29
87         resConfigs "de", "es", "eu", "fr", "it", "ja", "pt", "pt-rBR", "ru", "zh-rCN"
88         minSdkVersion 10
89     }
90     compileOptions {
91         coreLibraryDesugaringEnabled true
92         sourceCompatibility JavaVersion.VERSION_1_8
93         targetCompatibility JavaVersion.VERSION_1_8
94     }
95 }