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