Filipe | 14b41f8 | 2015-07-09 13:52:01 +0000 | [diff] [blame] | 1 | // Top level gradle declarations |
| 2 | |
| 3 | buildscript { |
| 4 | repositories { |
| 5 | jcenter() |
| 6 | maven { url 'http://repo1.maven.org/maven2' } |
| 7 | } |
| 8 | dependencies { |
| 9 | classpath 'com.android.tools.build:gradle:1.0.0' |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | allprojects { |
| 14 | repositories { |
| 15 | jcenter() |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | // Module level gradle declarations |
| 20 | |
| 21 | apply plugin: 'com.android.application' |
| 22 | |
| 23 | android { |
Maarten Derks | 3b282c8 | 2017-02-13 19:51:57 +0100 | [diff] [blame] | 24 | compileSdkVersion 23 |
Filipe | 14b41f8 | 2015-07-09 13:52:01 +0000 | [diff] [blame] | 25 | buildToolsVersion "21.1.2" |
| 26 | |
| 27 | defaultConfig { |
| 28 | applicationId "com.fairphone.programmablebutton" |
| 29 | minSdkVersion 17 |
Maarten Derks | 5d0491a | 2017-02-13 19:50:37 +0100 | [diff] [blame] | 30 | targetSdkVersion 23 |
Filipe | 14b41f8 | 2015-07-09 13:52:01 +0000 | [diff] [blame] | 31 | } |
| 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... |
| 53 | instrumentTest.setRoot('tests') |
| 54 | 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 | |
| 67 | dependencies { |
Maarten Derks | 44fb923 | 2017-02-13 19:51:19 +0100 | [diff] [blame] | 68 | compile 'com.android.support:support-v4:23.4.0' |
Filipe | 14b41f8 | 2015-07-09 13:52:01 +0000 | [diff] [blame] | 69 | } |