blob: 4baa8e5a50ec903549e2e2a211bd49af8b5cc6de [file] [log] [blame]
Filipe14b41f82015-07-09 13:52:01 +00001// Top level gradle declarations
2
3buildscript {
4 repositories {
5 jcenter()
Maarten Derks54f1a702020-06-02 13:31:19 +02006 maven { url 'http://repo1.maven.org/maven2' }
Filipe14b41f82015-07-09 13:52:01 +00007 }
8 dependencies {
Maarten Derks54f1a702020-06-02 13:31:19 +02009 classpath 'com.android.tools.build:gradle:1.0.0'
Filipe14b41f82015-07-09 13:52:01 +000010 }
11}
12
13allprojects {
14 repositories {
15 jcenter()
16 }
17}
18
19// Module level gradle declarations
20
21apply plugin: 'com.android.application'
22
23android {
Maarten Derks54f1a702020-06-02 13:31:19 +020024 compileSdkVersion 23
25 buildToolsVersion "21.1.2"
Filipe14b41f82015-07-09 13:52:01 +000026
27 defaultConfig {
28 applicationId "com.fairphone.programmablebutton"
Maarten Derks54f1a702020-06-02 13:31:19 +020029 minSdkVersion 17
30 targetSdkVersion 23
Filipe14b41f82015-07-09 13:52:01 +000031 }
32
33 buildTypes {
34 release {
35 minifyEnabled true
36 shrinkResources true
37 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
38 }
39 }
40
41 sourceSets {
42 main {
43 manifest.srcFile 'AndroidManifest.xml'
44 java.srcDirs = ['src']
45 resources.srcDirs = ['src']
46 aidl.srcDirs = ['src']
47 renderscript.srcDirs = ['src']
48 res.srcDirs = ['res']
49 assets.srcDirs = ['assets']
50 }
51
52 // Move the tests to tests/java, tests/res, etc...
Maarten Derks54f1a702020-06-02 13:31:19 +020053 instrumentTest.setRoot('tests')
Filipe14b41f82015-07-09 13:52:01 +000054 androidTest.setRoot('tests')
55
56 // Move the build types to build-types/<type>
57 // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
58 // This moves them out of them default location under src/<type>/... which would
59 // conflict with src/ being used by the main source set.
60 // Adding new build types or product flavors should be accompanied
61 // by a similar customization.
62 debug.setRoot('build-types/debug')
63 release.setRoot('build-types/release')
64 }
65}
66
67dependencies {
Maarten Derks54f1a702020-06-02 13:31:19 +020068 compile 'com.android.support:support-v4:23.4.0'
Filipe14b41f82015-07-09 13:52:01 +000069}