Merge pull request #2475 from hannesa2/AndroidStudio-3.4.2
Travis simplifications
This commit is contained in:
commit
61892a6570
23
.travis.yml
23
.travis.yml
|
@ -1,27 +1,16 @@
|
||||||
language: android
|
language: android
|
||||||
#jdk: oraclejdk8
|
|
||||||
env:
|
jdk: oraclejdk8
|
||||||
- TEST=unit
|
|
||||||
# - TEST=android ANDROID_TARGET=android-25 ANDROID_ABI=armeabi-v7a ADB_INSTALL_TIMEOUT=10
|
|
||||||
|
|
||||||
# force non-container build
|
# force non-container build
|
||||||
sudo: required
|
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:
|
android:
|
||||||
components:
|
components:
|
||||||
- tools
|
- tools
|
||||||
- android-27
|
- android-28
|
||||||
- platform-tools
|
- platform-tools
|
||||||
- build-tools-27.0.3
|
- build-tools-28.0.3
|
||||||
- extra-android-support
|
- extra-android-support
|
||||||
- extra-android-m2repository
|
- extra-android-m2repository
|
||||||
- sys-img-armeabi-v7a-android-27
|
- sys-img-armeabi-v7a-android-27
|
||||||
|
@ -31,9 +20,7 @@ android:
|
||||||
- 'google-gdk-license-.+'
|
- 'google-gdk-license-.+'
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if [ ${TEST} == "unit" ]; then
|
./gradlew --stacktrace testDebug
|
||||||
./gradlew --stacktrace testDebug jacocoTestReport;
|
|
||||||
fi
|
|
||||||
- if [ ${TEST} == "android" ]; then
|
- if [ ${TEST} == "android" ]; then
|
||||||
echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI;
|
echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI;
|
||||||
emulator -avd test -no-skin -no-audio -no-window &
|
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)
|
* 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
|
#### 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.
|
* 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
|
#### Update library
|
||||||
|
@ -122,11 +115,10 @@ ext {
|
||||||
#### Add new library
|
#### 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 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``
|
* 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 {
|
android {
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
* You can check for wrong ``compileSdkVersion`` by ``find -name build.gradle | xargs grep compileSdkVersion``
|
* 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