Update gradle build files to 0.7.3 android plugin, add Gradle 1.9 wrapper, add information about build to readme

This commit is contained in:
Dominik Schürmann 2014-01-16 22:33:11 +01:00
parent 16b753acca
commit ca95cb9a43
8 changed files with 38 additions and 19 deletions

View File

@ -4,8 +4,7 @@ buildscript {
}
dependencies {
// NOTE: Avoid using dynamic versions (+). This breaks offline builds!
classpath 'com.android.tools.build:gradle:0.6.3'
classpath 'com.android.tools.build:gradle:0.7.3'
}
}
@ -15,9 +14,6 @@ repositories {
mavenCentral()
}
/*
* NOTE: Avoid dependencies from Maven. Include as much sources as possible for F-Droid!
*/
dependencies {
compile fileTree(dir: 'libs', includes: ['*.jar'], excludes: ['android-support-v4.jar'])
compile 'com.android.support:support-v4:19.0.+' // already in actionbarsherlock
@ -79,4 +75,9 @@ android {
} else {
buildTypes.release.signingConfig = null
}
// Do not abort build if lint finds errors
lintOptions {
abortOnError false
}
}

View File

@ -333,7 +333,7 @@
<string name="import_qr_code_wrong">QR Code malformed! Please try again!</string>
<string name="import_qr_code_finished">QR Code scanning finished!</string>
<string name="import_qr_scan_button">Scan QR Code with \'Barcode Scanner\'</string>
<string name="import_nfc_text">To exchange keys via NFC, the device needs to be unlocked.</string>
<string name="import_nfc_text">To receive keys via NFC, the device needs to be unlocked.</string>
<string name="import_nfc_help_button">Help</string>
<string name="import_clipboard_button">Get key from clipboard</string>

View File

@ -105,6 +105,8 @@ TODO
# Libraries
## ZXing Barcode Scanner Android Integration
Classes can be found under "libraries/zxing-android-integration/".
@ -151,6 +153,21 @@ See http://docs.oseems.com/general/application/eclipse/fix-gc-overhead-limit-exc
1. Open svg file in Inkscape
2. Extensions -> Color -> darker (2 times!)
## Gradle Build System
We try to make our builds as [reproducible/deterministic](https://blog.torproject.org/blog/deterministic-builds-part-one-cyberwar-and-global-compromise) as possible.
This is also a key requirement to be part of F-Droid.
When changing build files or dependencies, respect the following requirements:
- No precompiled libraries. All libraries should be provided as sourcecode in "libraries" folder
- No dependencies from Maven
- Always use a fixed Android Gradle plugin version not a dynamic one, e.g. ``0.7.3`` instead of ``0.7.+``
- Commit the corresponding gradle wrapper version to the repository
TODO:
[ ] include support lib as source
[ ] include Spongy Castle as source
[ ] resolve lint errors (currently abortOnError is false in some build.gradle files of main project and libraries)
# Coding Style
## Code

View File

@ -4,7 +4,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.3'
classpath 'com.android.tools.build:gradle:0.7.3'
}
}
@ -15,5 +15,5 @@ allprojects {
}
task wrapper(type: Wrapper) {
gradleVersion = '1.8'
gradleVersion = '1.9'
}

Binary file not shown.

View File

@ -1,6 +1,6 @@
#Mon Dec 30 23:22:47 CET 2013
#Thu Jan 16 22:16:02 CET 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-bin.zip

View File

@ -15,4 +15,9 @@ android {
res.srcDirs = ['res']
}
}
// Do not abort build if lint finds errors
lintOptions {
abortOnError false
}
}

View File

@ -1,12 +1,3 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.3'
}
}
apply plugin: 'android-library'
@ -21,4 +12,9 @@ android {
res.srcDirs = ['res']
}
}
// Do not abort build if lint finds errors
lintOptions {
abortOnError false
}
}