From 670b4b8718e48aec0c218e4fc5144f3cec5bfead Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 19 Oct 2018 14:24:13 +0300 Subject: [PATCH] Add SonarCloud integration, update gradle wrapper --- .gitignore | 6 +++++- .travis.yml | 16 ++++++++-------- build.gradle | 9 +++++++++ gradle/wrapper/gradle-wrapper.properties | 2 +- proguard.properties | 1 + 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index afb3211..bf174c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,11 @@ /.gradle/ +/.idea/ +/.nb-gradle/ /build/ /dist/ /store/ /optimizations/ /nbproject/private/ -/src/main/generatedJava/ \ No newline at end of file +/src/main/generatedJava/ +OwnLang.iml +.nb-gradle-properties diff --git a/.travis.yml b/.travis.yml index b2f44ba..4c78dea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,23 @@ language: java +sudo: false +install: true jdk: - oraclejdk8 +addons: + sonarcloud: + organization: "annimon-github" + cache: directories: - $HOME/.m2 - $HOME/.gradle + - $HOME/.sonar/cache -sudo: false - before_install: - chmod +x gradlew after_success: - - ./gradlew proguard + - ./gradlew proguard sonarqube - test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "latest" && curl -F "file=@store/OwnLang.jar" http://projects.annimon.com/samples/php/travis/upload.php?mode=ownlang - -addons: - apt: - packages: - - oracle-java8-installer diff --git a/build.gradle b/build.gradle index 323da22..d7cef78 100644 --- a/build.gradle +++ b/build.gradle @@ -10,6 +10,7 @@ buildscript { plugins { id "java" id "com.github.johnrengelman.shadow" version "2.0.2" + id "org.sonarqube" version "2.6.2" } import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar @@ -123,3 +124,11 @@ dependencies { testImplementation 'org.openjdk.jmh:jmh-core:1.13' testImplementation 'org.openjdk.jmh:jmh-generator-annprocess:1.13' } + +sonarqube { + properties { + property "sonar.projectName", "Own-Programming-Language-Tutorial" + property "sonar.projectKey", "aNNiMON_Own-Programming-Language-Tutorial" + property "sonar.host.url", "https://sonarcloud.io" + } +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d4f7b5e..95b89ea 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Fri Mar 09 10:54:07 EET 2018 -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/proguard.properties b/proguard.properties index ca1ee69..a75f2fe 100644 --- a/proguard.properties +++ b/proguard.properties @@ -8,6 +8,7 @@ -dontwarn okio.** -dontwarn okhttp3.** -dontwarn org.fusesource.jansi.internal.** +-dontwarn javafx.** -keepclasseswithmembers public class * { public static void main(java.lang.String[]);