Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Gradle 8 Test Build #287

Merged
merged 10 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 66 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,98 @@ name: CI

on: ['push', 'pull_request']

env:
PRIVATE_REPO: "${{ github.workspace }}/build/githubActionGrettyPrivateRepository"

jobs:
build-and-test:

build:
name: Build Gretty
runs-on: ubuntu-latest

env:
JDK_VERSION: "17"
GRADLE_VERSION: "7.6.2"

steps:
- uses: actions/checkout@v3

- name: Set up JDK ${{ env.JDK_VERSION }}
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ env.JDK_VERSION }}

- name: Build with Gradle ${{ env.GRADLE_VERSION }}
run: |
set -e
./gradlew --no-daemon wrapper --gradle-version $GRADLE_VERSION --distribution-type all
./gradlew --no-daemon --warning-mode all -PprivateRepoDir=$PRIVATE_REPO build
set +e

- uses: actions/upload-artifact@v3
with:
name: gretty-private-repository
path: ${{ env.PRIVATE_REPO }}

test:
name: Gradle ${{ matrix.gradle }} on Java ${{ matrix.java }}
runs-on: ubuntu-latest
needs: build

strategy:
matrix:
java: [11]
gradle: ['6.9.4']
include:

- java: 11
gradle: '7.6.2'
properties: '-Pspock_version=2.3-groovy-3.0 -PgebVersion=5.1'

- java: 17
gradle: '7.6.2'
properties: '-Pspock_version=2.3-groovy-3.0 -PgebVersion=5.1'

- java: 17
gradle: '8.2.1'

env:
TEST_ALL_CONTAINERS: "['tomcat10','jetty11']"
TEST_ALL_CONTAINERS: ${{ matrix.container }}
GRADLE_VERSION: ${{ matrix.gradle }}
BINTRAY_REPO: maven
BINTRAY_PACKAGE: org.gretty
EXTRA_PROPERTIES: ${{ matrix.properties }}

steps:
- uses: actions/checkout@v3

# Begin workaround: because the current Gradle wrapper does not support Java 17,
# we use JDK 15 to bootstrap the appropriate Gradle version, and then proceed
# to use a recent version of Gradle and Java.
- name: Set up JDK 15
uses: actions/setup-java@v3
- uses: actions/download-artifact@v3
with:
distribution: 'zulu'
java-version: 15
- name: Bootstrap Gradle version
run: ./gradlew --no-daemon wrapper --gradle-version $GRADLE_VERSION --distribution-type all
# end workaround
name: gretty-private-repository
path: ${{ env.PRIVATE_REPO }}

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}

- name: Cache Gradle stuff
uses: actions/cache@v2
with:
path: |
~/.gradle/wrapper
~/.gradle/caches/modules-2
key: ${{ runner.os }}-build-${{ env.GRADLE_VERSION }}-${{ hashFiles('**/*.gradle', 'gradle.properties') }}
- name: Set up Gradle ${{ matrix.gradle }}
run: ./gradlew --no-daemon wrapper --gradle-version $GRADLE_VERSION --distribution-type all

- name: Build and Test
# ./gradlew --no-daemon wrapper --gradle-version $GRADLE_VERSION --distribution-type all
# begin workaround - see also integrationTests/buildSrc/build.gradle
- name: Install buildSrc project (only required for Gradle 8)
run: |
set -e
./gradlew --no-daemon --warning-mode all $EXTRA_PROPERTIES build
cd integrationTests
../gradlew --no-daemon --warning-mode all $EXTRA_PROPERTIES -PgeckoDriverPlatform=linux64 -PtestAllContainers=$TEST_ALL_CONTAINERS testAll
cd ..
set +e
../../gradlew --no-daemon \
--warning-mode all \
-PprivateRepoDir=$PRIVATE_REPO \
publishToPrivateRepo
if: "startsWith(env.GRADLE_VERSION, '8.')"
working-directory: integrationTests/buildSrc
# end workaround

- name: Run Integration Tests
run: |
../gradlew --no-daemon \
--warning-mode all \
-PprivateRepoDir=$PRIVATE_REPO \
$EXTRA_PROPERTIES \
-PgeckoDriverPlatform=linux64 \
-PtestAllContainers=$TEST_ALL_CONTAINERS \
testAll
working-directory: integrationTests
46 changes: 0 additions & 46 deletions .github/workflows/transition.yml

This file was deleted.

13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

![Build Status](https://github.com/gretty-gradle-plugin/gretty/workflows/CI/badge.svg)
![Maintenance Status](https://img.shields.io/maintenance/yes/2023.svg)
[![Latest release](https://img.shields.io/badge/release-4.0.3-47b31f.svg)](https://github.com/gretty-gradle-plugin/gretty/tree/v4.0.3)
[![Snapshot](https://img.shields.io/badge/current-4.0.4--SNAPSHOT-47b31f.svg)](https://github.com/gretty-gradle-plugin/gretty/tree/master)
[![Latest release](https://img.shields.io/badge/release-4.1.0-47b31f.svg)](https://github.com/gretty-gradle-plugin/gretty/tree/v4.1.0)
[![Snapshot](https://img.shields.io/badge/current-4.1.1--SNAPSHOT-47b31f.svg)](https://github.com/gretty-gradle-plugin/gretty/tree/master)
[![License](https://img.shields.io/badge/license-MIT-47b31f.svg)](#copyright-and-license)

Gretty is a feature-rich Gradle plugin for running web-apps on embedded servlet containers.
Expand All @@ -22,6 +22,15 @@ If you are new with Gretty, try [getting started](https://gretty-gradle-plugin.g

#### :star: What's new

### Version 4.1.0
July 12, 2023, Gretty 4.1.0 is out and available at [Gradle Plugins](https://plugins.gradle.org/plugin/org.gretty) and [Maven Central](https://search.maven.org/artifact/org.gretty/gretty).

* Drops Gradle 6 support

* Enables stricter plugin validation

* Adds Gradle 8 integration test build

August 24, 2022, Gretty 4.0.3 is out and available at [Gradle Plugins](https://plugins.gradle.org/plugin/org.gretty) and [Maven Central](https://search.maven.org/artifact/org.gretty/gretty).

* Changes in this version:
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/groovy/grettybuild.common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ configurations {
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
archiveClassifier.set('javadoc')
f4lco marked this conversation as resolved.
Show resolved Hide resolved
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
archiveClassifier.set('sources')
from sourceSets.main.allSource
}

Expand Down
6 changes: 6 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

[![logo](https://gretty-gradle-plugin.github.io/gretty-doc/images/gretty_logo.png "gretty logo")](https://github.com/gretty-gradle-plugin/gretty)

### Version 4.1.0

* Drops Gradle 6 support
* Enables stricter plugin validation
* Adds Gradle 8 integration test build

### Version 4.0.3

* Replace internal Gradle API usage with public API #263
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ developerId = gretty-gradle-plugin
developerName = Andrey Hihlovskiy
license = MIT
group = org.gretty
version = 4.0.4-SNAPSHOT
version = 4.1.0
jetty11_version = 11.0.15
jetty11_servlet_api_version = 5.0.0
tomcat10_version = 10.1.10
tomcat10_servlet_api_version = 5.0.0
asm_version = 9.5
spock_version = 1.3-groovy-2.5
spock_version = 2.0-groovy-3.0
commons_cli_version = 1.5.0
commons_io_version = 2.13.0
slf4j_version = 2.0.7
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
# We want to build releases with Gradle 6 so we support both Gradle 6 and 7:
# We want to build releases with Gradle 7 so we support both Gradle 7 and 8:
# https://github.com/gretty-gradle-plugin/gretty/pull/214#issuecomment-812289131
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading