diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..eff2427 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,32 @@ +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + cache: gradle + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - uses: actions/upload-artifact@v2 + with: + name: Package + path: build/libs \ No newline at end of file diff --git a/README.md b/README.md index 4ca876e..6c05767 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # TESTAR Model Difference +[![Java CI with Gradle](https://github.com/TESTARtool/Model-Difference/actions/workflows/pipeline.yml/badge.svg)](https://github.com/TESTARtool/Model-Difference/actions/workflows/pipeline.yml) [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) TESTAR tool repository that contains the State Model Difference feature diff --git a/build.gradle b/build.gradle index b631c82..4716f2b 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group 'nl.ou.testar' -version '0.1.0-init' +version '1.0.0' repositories { mavenCentral() @@ -26,6 +26,15 @@ test { useJUnitPlatform() } +jar { + manifest { + attributes 'Main-Class': 'Program' + } + from { + configurations.runtimeClasspath.collect {it.isDirectory() ? it: zipTree(it)} + } +} + sonarqube { properties { property "sonar.projectKey", "model-difference" diff --git a/src/main/java/Main.java b/src/main/java/Program.java similarity index 99% rename from src/main/java/Main.java rename to src/main/java/Program.java index 0fbb769..ee02625 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Program.java @@ -18,7 +18,7 @@ import java.util.logging.Level; import java.util.logging.Logger; -public class Main { +public class Program { public static void main(String[] args) {