Skip to content

Commit

Permalink
build: initialize JDK 17 build
Browse files Browse the repository at this point in the history
  • Loading branch information
v1nc3n4 committed Jul 7, 2023
1 parent 9ff7fe3 commit 6b364da
Show file tree
Hide file tree
Showing 33 changed files with 68 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:
with:
fetch-depth: 1

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: '11'
java-version: '17'
architecture: x64

- name: Cache Gradle's cache and wrapper
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<a href="https://github.com/siouan/frontend-gradle-plugin/releases/tag/v7.0.0"><img src="https://img.shields.io/badge/Latest%20release-7.0.0-blue.svg" alt="Latest release 7.0.0"/></a>
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-green.svg" alt="License Apache 2.0"/></a>
<br/>
<a href="https://github.com/siouan/frontend-gradle-plugin/actions/workflows/build.yml"><img src="https://github.com/siouan/frontend-gradle-plugin/actions/workflows/build.yml/badge.svg?branch=7.0-jdk11" alt="Build status"/></a>
<a href="https://github.com/siouan/frontend-gradle-plugin/actions/workflows/build.yml"><img src="https://github.com/siouan/frontend-gradle-plugin/actions/workflows/build.yml/badge.svg?branch=7.0-jdk17" alt="Build status"/></a>
<a href="https://sonarcloud.io/project/overview?id=siouan_frontend-gradle-plugin"><img src="https://sonarcloud.io/api/project_badges/measure?project=siouan_frontend-gradle-plugin&metric=alert_status" alt="Quality gate status"/></a>
<a href="https://sonarcloud.io/summary/overall?id=siouan_frontend-gradle-plugin"><img src="https://sonarcloud.io/api/project_badges/measure?project=siouan_frontend-gradle-plugin&metric=coverage" alt="Code coverage"/></a>
<a href="https://sonarcloud.io/summary/overall?id=siouan_frontend-gradle-plugin"><img src="https://sonarcloud.io/api/project_badges/measure?project=siouan_frontend-gradle-plugin&metric=reliability_rating" alt="Reliability"/></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNode
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpm

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

//val preinstalledNodeDistributionDirectory = file(<path-to-nodejs-install-directory>);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.0.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
2 changes: 1 addition & 1 deletion examples/fullstack-war-application/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginManagement {
id("war")
id("org.springframework.boot") version "2.7.12"
id("io.spring.dependency-management") version "1.1.0"
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.0.0"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNode

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpm

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpm

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunPnpm

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunPnpm

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.0.0"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunYarn

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunYarn

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
2 changes: 1 addition & 1 deletion examples/npm-application/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
2 changes: 1 addition & 1 deletion examples/npm-application/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/pnpm-application/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
2 changes: 1 addition & 1 deletion examples/pnpm-application/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/yarn-application-with-pnp-linker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.0.0"
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 12 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -143,12 +140,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
13 changes: 10 additions & 3 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ version = fgpVersion
description = fgpDescription

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withJavadocJar()
withSourcesJar()
}
Expand Down Expand Up @@ -77,6 +77,13 @@ tasks.named<Wrapper>("wrapper") {
tasks.withType<Test> {
useJUnitPlatform()
outputs.upToDateWhen { false }
jvmArgs(
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
"--add-opens", "java.base/java.util=ALL-UNNAMED"
)
distribution {
enabled.set(true)
}
}

tasks.register<Test>("integrationTest") {
Expand Down Expand Up @@ -140,7 +147,7 @@ sonarqube {
property("sonar.organization", "siouan")
property("sonar.projectKey", "siouan_frontend-gradle-plugin")
property("sonar.projectName", "frontend-gradle-plugin")
property("sonar.projectVersion", "${fgpVersion}-jdk11")
property("sonar.projectVersion", "${fgpVersion}-jdk17")

property("sonar.links.homepage", "https://github.com/siouan/frontend-gradle-plugin")
property("sonar.links.ci", "https://travis-ci.com/siouan/frontend-gradle-plugin")
Expand Down
4 changes: 2 additions & 2 deletions plugin/buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
2 changes: 1 addition & 1 deletion plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fgpArtifactId=frontend-jdk11
fgpArtifactId=frontend-jdk17
fgpGroup=org.siouan
fgpVersion=7.0.0
fgpDisplayName=Frontend Gradle plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void createBuildFile(final Path projectDirectory, final boolean pl
final String additionalContent) throws IOException {
final Set<String> pluginsWithFrontend = new HashSet<>(plugins);
if (pluginEnabled) {
pluginsWithFrontend.add("id 'org.siouan.frontend-jdk11' apply " + pluginApplied);
pluginsWithFrontend.add("id 'org.siouan.frontend-jdk17' apply " + pluginApplied);
}
createBuildFile(projectDirectory, pluginsWithFrontend, properties, additionalContent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
public final class GradleHelper {

private static final String MINIMAL_GRADLE_VERSION = "6.1";
private static final String MINIMAL_GRADLE_VERSION = "7.3";

private GradleHelper() {
}
Expand Down
4 changes: 2 additions & 2 deletions site/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ buildscript {
}

dependencies {
classpath("org.siouan", "frontend-jdk11", "7.0.0")
classpath("org.siouan", "frontend-jdk17", "7.0.0")
}
}

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Loading

0 comments on commit 6b364da

Please sign in to comment.