From f3924e8748efe3b035a43ec62eb1ab54179c6221 Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Wed, 10 Nov 2021 09:31:00 +0100 Subject: chore: updates junit 5.7.2 -> 5.8.1, README and version --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 35 ----------------------------------- README.md | 24 ++++++++++++++++++++---- build.gradle | 2 +- gradle.properties | 2 +- 5 files changed, 57 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c82e9d6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Test +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + workflow_dispatch: + +jobs: + ci: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-10.15, ubuntu-20.04, windows-2019] + + steps: + - name: Checkout Repository + uses: actions/checkout@v2.3.4 + + - name: Setup Java 11 + uses: actions/setup-java@v2 + with: + distribution: 'adopt-openj9' + java-version: '11' + + - name: Run Unit & Functional Tests + run: | + if [ "$RUNNER_OS" = "Windows" ]; then + ./gradlew.bat clean check + else + ./gradlew clean check + fi + shell: bash \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c82e9d6..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Test -on: - push: - branches: [ main, develop ] - pull_request: - branches: [ main, develop ] - workflow_dispatch: - -jobs: - ci: - name: ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-10.15, ubuntu-20.04, windows-2019] - - steps: - - name: Checkout Repository - uses: actions/checkout@v2.3.4 - - - name: Setup Java 11 - uses: actions/setup-java@v2 - with: - distribution: 'adopt-openj9' - java-version: '11' - - - name: Run Unit & Functional Tests - run: | - if [ "$RUNNER_OS" = "Windows" ]; then - ./gradlew.bat clean check - else - ./gradlew clean check - fi - shell: bash \ No newline at end of file diff --git a/README.md b/README.md index f909cf7..76b42c5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Frege Gradle Plugin -Compile frege code with gradle. +![build](https://github.com/tricktron/frege-gradle-plugin/actions/workflows/build.yml/badge.svg) + +Simplifies setting up your Frege project. ## Installation @@ -10,18 +12,32 @@ git clone https://github.com/tricktron/frege-gradle-plugin.git ``` ## How to Use -1. Specify the frege compiler release and version in your `build.gradle`: +1. Specify the frege compiler release, version and main module in your `build.gradle`: ```groovy frege { version = '3.25.84' release = '3.25alpha' + mainModule = 'my.mod.Name' } ``` -See the [frege releases](https://github.com/Frege/frege/releases) for all available versions. +See the [Frege Releases](https://github.com/Frege/frege/releases) for all available versions. + +Optional configuration parameters inside `build.gradle`: +- compilerDownloadDir: defaults to `/lib` +- mainSourceDir: defaults to `/src/main/frege` +- outputDir: defaults to `/build/classes/main/frege` + + + + +### Added Tasks + +- **setupFrege**: Downloads the specified version of the Frege compiler. +- **compileFrege**: All your `*.fr` files in `mainSourceDir` get compiled to `outputDir`. +- **runFrege**: Runs the Frege module specified by `mainModule`. Alternatively you can also pass the main module by command line, e.g: `gradle runFrege --mainModule=my.mod.Name`. -2. Run the newly added `compileFrege` task. All your `*.fr` files get compiled to `build/classes/frege`. ## How to Contribute Try to add another task, e.g. `fregeDoc` to the [FregePluginFunctionalTest.java](src/functionalTest/java/ch/fhnw/thga/gradleplugins/FregePluginFunctionalTest.java) file and try to make the test pass. \ No newline at end of file diff --git a/build.gradle b/build.gradle index a30daed..f64913d 100644 --- a/build.gradle +++ b/build.gradle @@ -45,7 +45,7 @@ tasks.withType(Test).configureEach { dependencies { def junit5Group = 'org.junit.jupiter' - def junit5Version = '5.7.2' + def junit5Version = '5.8.1' testImplementation group: junit5Group, name: 'junit-jupiter-api', version: junit5Version testRuntimeOnly group: junit5Group, name: 'junit-jupiter-engine', version: junit5Version } diff --git a/gradle.properties b/gradle.properties index cae3d07..52f90fe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ group = ch.fhnw.thga -version = 1.0.0-alpha \ No newline at end of file +version = 1.1.0-alpha \ No newline at end of file -- cgit