source: .travis.yml @ 7f673bb

Last change on this file since 7f673bb was 7f673bb, checked in by str4d <str4d@…>, 2 years ago

Travis CI: Dynamically add SonarQube? plugin to build.gradle

  • Property mode set to 100644
File size: 1.5 KB
Line 
1language: java
2
3jdk:
4  - oraclejdk9
5  - openjdk8
6
7matrix:
8  include:
9    - jdk: oraclejdk8
10      addons:
11        sonarcloud:
12          organization: "i2p"
13    - jdk: openjdk7
14      sudo: required
15      before_install: # Work around missing crypto in openjdk7
16        - sudo wget "https://bouncycastle.org/download/bcprov-ext-jdk15on-158.jar" -O "${JAVA_HOME}/jre/lib/ext/bcprov-ext-jdk15on-158.jar"
17        - sudo perl -pi.bak -e 's/^(security\.provider\.)([0-9]+)/$1.($2+1)/ge' /etc/java-7-openjdk/security/java.security
18        - echo "security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider" | sudo tee -a /etc/java-7-openjdk/security/java.security
19
20before_install:
21 - |
22    if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then
23      echo "plugins {
24    id 'org.sonarqube' version '2.6.1'
25}
26" | cat - build.gradle > build.gradle.temp
27      mv build.gradle.temp build.gradle
28    fi
29
30before_cache:
31  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
32  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
33cache:
34  directories:
35    - $HOME/.gradle/caches/
36    - $HOME/.gradle/wrapper/
37    - $HOME/.sonar/cache/
38    - .gradle
39
40script:
41  - |
42    if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then
43      ./gradlew sonarqube codeCoverageReport
44    else
45      ./gradlew check codeCoverageReport
46    fi
47
48after_success:
49  - bash <(curl -s https://codecov.io/bash)
50
51notifications:
52  irc:
53    channels:
54      - "chat.freenode.net#i2p-dev"
55    on_success: change
56    on_failure: always
Note: See TracBrowser for help on using the repository browser.