Travis simplification
This commit is contained in:
parent
ec6b02f97e
commit
ffa23c819b
3 changed files with 6 additions and 44 deletions
23
.travis.yml
23
.travis.yml
|
@ -1,27 +1,16 @@
|
|||
language: android
|
||||
#jdk: oraclejdk8
|
||||
env:
|
||||
- TEST=unit
|
||||
# - TEST=android ANDROID_TARGET=android-25 ANDROID_ABI=armeabi-v7a ADB_INSTALL_TIMEOUT=10
|
||||
|
||||
jdk: oraclejdk8
|
||||
|
||||
# force non-container build
|
||||
sudo: required
|
||||
before_install:
|
||||
- sudo add-apt-repository ppa:openjdk-r/ppa -y
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install -y openjdk-8-jdk
|
||||
- sudo update-alternatives --auto java
|
||||
- sudo update-alternatives --auto javac
|
||||
- export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
# workaround for https://github.com/travis-ci/travis-ci/issues/8874
|
||||
- yes | sdkmanager "platforms;android-27"
|
||||
|
||||
android:
|
||||
components:
|
||||
- tools
|
||||
- android-27
|
||||
- android-28
|
||||
- platform-tools
|
||||
- build-tools-27.0.3
|
||||
- build-tools-28.0.3
|
||||
- extra-android-support
|
||||
- extra-android-m2repository
|
||||
- sys-img-armeabi-v7a-android-27
|
||||
|
@ -31,9 +20,7 @@ android:
|
|||
- 'google-gdk-license-.+'
|
||||
|
||||
script:
|
||||
- if [ ${TEST} == "unit" ]; then
|
||||
./gradlew --stacktrace testDebug jacocoTestReport;
|
||||
fi
|
||||
./gradlew --stacktrace testDebug
|
||||
- if [ ${TEST} == "android" ]; then
|
||||
echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI;
|
||||
emulator -avd test -no-skin -no-audio -no-window &
|
||||
|
|
10
README.md
10
README.md
|
@ -107,13 +107,6 @@ We try to make our builds as [reproducible/deterministic](https://blog.torprojec
|
|||
* commit the corresponding [Gradle wrapper](http://www.gradle.org/docs/current/userguide/gradle_wrapper.html) to the repository (allows easy building for new contributors without the need to install the required Gradle version using a package manager)
|
||||
|
||||
#### Update SDK and Build Tools
|
||||
* Open build.gradle and change:
|
||||
```
|
||||
ext {
|
||||
compileSdkVersion = 21
|
||||
buildToolsVersion = '21.1.2'
|
||||
}
|
||||
```
|
||||
* Change SDK and Build Tools in git submodules "openkeychain-api-lib" and "openpgp-api-lib" manually. They should also build on their own without the ext variables.
|
||||
|
||||
#### Update library
|
||||
|
@ -122,11 +115,10 @@ ext {
|
|||
#### Add new library
|
||||
* You can add the library as a Maven dependency or as a git submodule (if patches are required) in the "extern" folder.
|
||||
* You can get all transitive dependencies with ``./gradlew -q dependencies OpenKeychain:dependencies``
|
||||
* If added as a git submodule, change the ``compileSdkVersion`` and ``buildToolsVersion`` in build.gradle to use the variables from the root project:
|
||||
* If added as a git submodule, change the ``compileSdkVersion`` in build.gradle to use the variables from the root project:
|
||||
```
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
}
|
||||
```
|
||||
* You can check for wrong ``compileSdkVersion`` by ``find -name build.gradle | xargs grep compileSdkVersion``
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
package org.sufficientlysecure.materialchips;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() throws Exception {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue