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