Filipe Gonçalves | 8edd395 | 2015-01-28 16:36:00 +0000 | [diff] [blame] | 1 | // Top level gradle declarations |
| 2 | |
| 3 | buildscript { |
| 4 | repositories { |
| 5 | jcenter() |
Filipe Gonçalves | 800e8b2 | 2015-01-28 16:49:43 +0000 | [diff] [blame] | 6 | maven { url 'http://repo1.maven.org/maven2' } |
| 7 | maven { url 'http://download.crashlytics.com/maven' } |
Filipe Gonçalves | 8edd395 | 2015-01-28 16:36:00 +0000 | [diff] [blame] | 8 | } |
| 9 | dependencies { |
Filipe | 72b5a7f | 2015-09-01 08:59:54 +0000 | [diff] [blame] | 10 | classpath 'com.android.tools.build:gradle:1.3.0' |
Filipe Gonçalves | 800e8b2 | 2015-01-28 16:49:43 +0000 | [diff] [blame] | 11 | classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+' |
Filipe Gonçalves | 8edd395 | 2015-01-28 16:36:00 +0000 | [diff] [blame] | 12 | } |
| 13 | } |
| 14 | |
| 15 | allprojects { |
| 16 | repositories { |
| 17 | jcenter() |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | // Module level gradle declarations |
| 22 | |
| 23 | apply plugin: 'com.android.application' |
| 24 | |
Filipe Gonçalves | 800e8b2 | 2015-01-28 16:49:43 +0000 | [diff] [blame] | 25 | apply plugin: 'crashlytics' |
| 26 | |
| 27 | repositories { |
| 28 | maven { url 'http://download.crashlytics.com/maven' } |
| 29 | } |
| 30 | |
Filipe Gonçalves | 8edd395 | 2015-01-28 16:36:00 +0000 | [diff] [blame] | 31 | android { |
| 32 | compileSdkVersion 21 |
| 33 | buildToolsVersion "21.1.2" |
| 34 | |
| 35 | defaultConfig { |
| 36 | applicationId "com.fairphone.updater" |
| 37 | minSdkVersion 17 |
| 38 | targetSdkVersion 21 |
| 39 | } |
| 40 | |
| 41 | buildTypes { |
| 42 | release { |
| 43 | minifyEnabled true |
| 44 | shrinkResources true |
| 45 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | sourceSets { |
| 50 | main { |
| 51 | manifest.srcFile 'AndroidManifest.xml' |
| 52 | java.srcDirs = ['src'] |
| 53 | resources.srcDirs = ['src'] |
| 54 | aidl.srcDirs = ['src'] |
| 55 | renderscript.srcDirs = ['src'] |
| 56 | res.srcDirs = ['res'] |
| 57 | assets.srcDirs = ['assets'] |
| 58 | } |
| 59 | |
| 60 | // Move the tests to tests/java, tests/res, etc... |
| 61 | instrumentTest.setRoot('tests') |
| 62 | androidTest.setRoot('tests') |
| 63 | |
| 64 | // Move the build types to build-types/<type> |
| 65 | // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... |
| 66 | // This moves them out of them default location under src/<type>/... which would |
| 67 | // conflict with src/ being used by the main source set. |
| 68 | // Adding new build types or product flavors should be accompanied |
| 69 | // by a similar customization. |
| 70 | debug.setRoot('build-types/debug') |
| 71 | release.setRoot('build-types/release') |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | dependencies { |
| 76 | compile 'com.android.support:support-v4:21.0.+' |
Filipe Gonçalves | 800e8b2 | 2015-01-28 16:49:43 +0000 | [diff] [blame] | 77 | compile 'com.crashlytics.android:crashlytics:1.+' |
Filipe Gonçalves | 8edd395 | 2015-01-28 16:36:00 +0000 | [diff] [blame] | 78 | compile files('libs/RootTools-3.3.jar') |
| 79 | } |