From e35d112b28285e8163f17844a9b71d80014f2c05 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 11 Jun 2021 20:22:57 -0700 Subject: [PATCH] Cleanup. --- .github/workflows/gradle.yml | 10 ++++++++++ build.gradle | 10 ++++------ version.properties | 6 +++--- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index a673ac4..715e6fe 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -5,22 +5,28 @@ on: [push, pull_request, workflow_dispatch] jobs: build: runs-on: ubuntu-latest + env: GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m" SONAR_JDK: "11" + strategy: matrix: java-version: [ 11, 15 ] + steps: - uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Set up JDK ${{ matrix.java-version }} uses: actions/setup-java@v1 with: java-version: ${{ matrix.java-version }} + - name: Grant execute permission for gradlew run: chmod +x gradlew + - name: Cache SonarCloud packages if: matrix.java-version == env.SONAR_JDK uses: actions/cache@v1 @@ -28,6 +34,7 @@ jobs: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar + - name: Cache Gradle packages uses: actions/cache@v2 with: @@ -37,6 +44,7 @@ jobs: key: ${{ runner.os }}-gradle-${{ matrix.java-version }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle-${{ matrix.java-version }}- + - name: Test with Gradle env: CI_NAME: "GitHub CI" @@ -51,12 +59,14 @@ jobs: TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }} TWITTER_TOKENSECRET: ${{ secrets.TWITTER_TOKENSECRET }} run: ./gradlew build check --stacktrace + - name: SonarCloud if: success() && matrix.java-version == env.SONAR_JDK env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: ./gradlew sonarqube + - name: Cleanup Gradle Cache run: | rm -f ~/.gradle/caches/modules-2/modules-2.lock diff --git a/build.gradle b/build.gradle index 500333a..5c5d0b4 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ plugins { id 'net.thauvin.erik.gradle.semver' version '1.0.4' id 'org.jetbrains.kotlin.jvm' version '1.5.10' id 'org.jetbrains.kotlin.kapt' version '1.5.10' - id 'org.sonarqube' version '3.2.0' + id 'org.sonarqube' version '3.3' id 'pmd' } @@ -19,6 +19,8 @@ final def packageName = 'net.thauvin.erik.mobibot' final def deployDir = 'deploy' final def semverProcessor = "net.thauvin.erik:semver:1.2.0" +mainClassName = packageName + '.Mobibot' + ext.versions = [ log4j : '2.14.1', pmd : '6.35.0', @@ -84,10 +86,6 @@ kapt { } } -application { - mainClassName = packageName + '.Mobibot' -} - tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } @@ -129,7 +127,7 @@ clean { } run { - args('-d') + args('-h') } incrementBuildMeta { diff --git a/version.properties b/version.properties index 772f2ee..f04ec96 100644 --- a/version.properties +++ b/version.properties @@ -1,9 +1,9 @@ #Generated by the Semver Plugin for Gradle -#Sat May 29 22:00:14 PDT 2021 -version.buildmeta=866 +#Mon May 31 14:55:18 PDT 2021 +version.buildmeta=870 version.major=0 version.minor=8 version.patch=0 version.prerelease=beta version.project=mobibot -version.semver=0.8.0-beta+866 +version.semver=0.8.0-beta+870