From cd878926cb3ff6d1a8f210abd81df5d793117429 Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:04:33 -0400 Subject: [PATCH 01/13] chore: update Gradle configuration for caching, parallel builds, and improved readability --- build.gradle.kts | 120 ++++++++++++++++++++++------------------------ gradle.properties | 9 +++- 2 files changed, 64 insertions(+), 65 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 20b3505..6a8047f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,85 +1,79 @@ plugins { - base - id("com.github.ben-manes.versions") version "0.54.0" + base + id("com.github.ben-manes.versions") version "0.54.0" } val defaultVersion = property("version").toString() -val resolvedVersion = if (System.getenv("GITHUB_REF_TYPE") == "tag") { - System.getenv("GITHUB_REF_NAME") - ?.takeIf { it.startsWith("v") } - ?.removePrefix("v") - ?: defaultVersion -} else { - defaultVersion -} +val resolvedVersion = + if (System.getenv("GITHUB_REF_TYPE") == "tag") { + System.getenv("GITHUB_REF_NAME")?.takeIf { it.startsWith("v") }?.removePrefix("v") + ?: defaultVersion + } else { + defaultVersion + } allprojects { - group = "be.theking90000" - version = resolvedVersion - - repositories { - mavenCentral() - } + version = resolvedVersion } subprojects { - apply(plugin = "java-library") - apply(plugin = "maven-publish") + apply(plugin = "java-library") + apply(plugin = "maven-publish") - extensions.configure { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 + extensions.configure { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 - withSourcesJar() - withJavadocJar() - } + withSourcesJar() + withJavadocJar() + } - tasks.withType().configureEach { - useJUnitPlatform() - } + tasks.withType().configureEach { + useJUnitPlatform() + } - extensions.configure { - publications { - create("mavenJava") { - from(components["java"]) + extensions.configure { + publications { + create("mavenJava") { + from(components["java"]) - pom { - name = project.name - description = "Dependency injection utilities for Java." - url = "https://github.com/theking90000/scope" + pom { + name = project.name + description = "Dependency injection utilities for Java." + url = "https://github.com/theking90000/scope" - licenses { - license { - name = "MIT License" - url = "https://opensource.org/licenses/MIT" - } - } - - developers { - developer { - id = "theking90000" - name = "theking90000" - } - } + licenses { + license { + name = "MIT License" + url = "https://opensource.org/licenses/MIT" + } + } - scm { - connection = "scm:git:git://github.com/theking90000/scope.git" - developerConnection = "scm:git:ssh://github.com/theking90000/scope.git" - url = "https://github.com/theking90000/scope" - } - } + developers { + developer { + id = "theking90000" + name = "theking90000" } + } + + scm { + connection = "scm:git:git://github.com/theking90000/scope.git" + developerConnection = "scm:git:ssh://github.com/theking90000/scope.git" + url = "https://github.com/theking90000/scope" + } } + } + } - repositories { - maven { - name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/theking90000/scope") - credentials { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") - } - } + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/theking90000/scope") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") } + } } + } } diff --git a/gradle.properties b/gradle.properties index 334c1c0..2411f1c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,8 @@ -org.gradle.jvmargs=-Xmx1g -Dfile.encoding=UTF-8 +group = be.theking90000 version=1.0.0-SNAPSHOT -org.gradle.configuration-cache=true \ No newline at end of file + +org.gradle.caching=true +org.gradle.parallel=true +org.gradle.configuration-cache=true +org.gradle.configuration-cache.parallel=true +org.gradle.jvmargs=-Xmx1g -Dfile.encoding=UTF-8 \ No newline at end of file From f4d5067fc4254ab7f192d8e4f603b74dea9b7ce9 Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:04:40 -0400 Subject: [PATCH 02/13] chore: configure dependency resolution management in Gradle settings --- settings.gradle.kts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/settings.gradle.kts b/settings.gradle.kts index 8e2e35a..15ec238 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,12 @@ rootProject.name = "scope" +@Suppress("UnstableApiUsage") +dependencyResolutionManagement { + repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS + + repositories { + mavenCentral() + } +} + include("scope") From 31b6e5980abd895bc1b0369ec359a5665a8ab1dd Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:06:26 -0400 Subject: [PATCH 03/13] chore: upgrade Gradle wrapper to 9.6.1 --- gradle/wrapper/gradle-wrapper.properties | 4 +- gradlew | 252 ++++++++++++++++++++++- gradlew.bat | 93 +++++++-- 3 files changed, 321 insertions(+), 28 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5dd3c01..a9db115 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,9 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 +retries=0 +retryBackOffMs=500 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 464e176..249efbb 100755 --- a/gradlew +++ b/gradlew @@ -1,18 +1,248 @@ #!/bin/sh -set -eu +# +# Copyright © 2015 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# -APP_HOME=$(CDPATH= cd -- "$(dirname "$0")" && pwd) -CLASSPATH="$APP_HOME/gradle/wrapper/gradle-wrapper.jar" +############################################################################## +# +# gradlew start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh gradlew +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## -if [ -n "${JAVA_HOME:-}" ]; then - JAVACMD="$JAVA_HOME/bin/java" +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi else - JAVACMD="java" + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +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=SC2039,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=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -exec "$JAVACMD" \ - -Dorg.gradle.appname=gradlew \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + 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 optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 33661e7..a51ec4f 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,21 +1,82 @@ -@ECHO OFF -SET DIRNAME=%~dp0 -IF "%DIRNAME%"=="" SET DIRNAME=. -SET APP_HOME=%DIRNAME% -SET CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -IF DEFINED JAVA_HOME GOTO findJavaFromJavaHome -SET JAVA_EXE=java.exe +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem gradlew startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -IF %ERRORLEVEL% EQU 0 GOTO execute -ECHO ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -EXIT /B 1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome -SET JAVA_EXE=%JAVA_HOME%\bin\java.exe -IF EXIST "%JAVA_EXE%" GOTO execute -ECHO ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -EXIT /B 1 +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 :execute -"%JAVA_EXE%" -Dorg.gradle.appname=gradlew -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +@rem Setup the command line + + + +@rem Execute gradlew +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel + +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% From 2f535cf9ef0fddac9cee0d31e6269fc0026bf6e6 Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:08:52 -0400 Subject: [PATCH 04/13] chore: fix formatting issue in gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 2411f1c..3a5bf48 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -group = be.theking90000 +group=be.theking90000 version=1.0.0-SNAPSHOT org.gradle.caching=true From ab470c4e5218bc0dff190dc03fe8746d67955337 Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:12:33 -0400 Subject: [PATCH 05/13] feat: add buildSrc module with Java conventions precompiled script plugins --- buildSrc/build.gradle.kts | 7 +++++++ .../scope/java-base-conventions.gradle.kts | 9 +++++++++ .../scope/java-library-conventions.gradle.kts | 11 +++++++++++ 3 files changed, 27 insertions(+) create mode 100644 buildSrc/build.gradle.kts create mode 100644 buildSrc/src/main/kotlin/be/theking90000/scope/java-base-conventions.gradle.kts create mode 100644 buildSrc/src/main/kotlin/be/theking90000/scope/java-library-conventions.gradle.kts diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 0000000..52b9cc0 --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + `kotlin-dsl` +} + +repositories { + gradlePluginPortal() +} diff --git a/buildSrc/src/main/kotlin/be/theking90000/scope/java-base-conventions.gradle.kts b/buildSrc/src/main/kotlin/be/theking90000/scope/java-base-conventions.gradle.kts new file mode 100644 index 0000000..2e805d9 --- /dev/null +++ b/buildSrc/src/main/kotlin/be/theking90000/scope/java-base-conventions.gradle.kts @@ -0,0 +1,9 @@ +package be.theking90000.scope + +plugins.withType { + extensions.getByType().apply { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } + } +} diff --git a/buildSrc/src/main/kotlin/be/theking90000/scope/java-library-conventions.gradle.kts b/buildSrc/src/main/kotlin/be/theking90000/scope/java-library-conventions.gradle.kts new file mode 100644 index 0000000..402ebab --- /dev/null +++ b/buildSrc/src/main/kotlin/be/theking90000/scope/java-library-conventions.gradle.kts @@ -0,0 +1,11 @@ +package be.theking90000.scope + +plugins { + `java-library` + id("be.theking90000.scope.java-base-conventions") +} + +java { + withSourcesJar() + withJavadocJar() +} From 12f4f45e4ee7dafb65d5901a95986c00cf016044 Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:16:10 -0400 Subject: [PATCH 06/13] chore: add libs.versions.toml for dependency version catalog --- gradle/libs.versions.toml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 gradle/libs.versions.toml diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..26974cd --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,7 @@ +[versions] +junit-bom = "6.1.0" + +[libraries] +junit-bom = { module = "org.junit:junit-bom", version.ref = "junit-bom" } +junit-jupiter = { module = "org.junit.jupiter:junit-jupiter" } +junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" } \ No newline at end of file From f25677bc93dc66cb4193c75a2f8ae1e3d69d925b Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:16:19 -0400 Subject: [PATCH 07/13] chore: apply java-library-conventions plugin and refactor test dependencies configuration --- scope/build.gradle.kts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scope/build.gradle.kts b/scope/build.gradle.kts index f5ab05f..777baee 100644 --- a/scope/build.gradle.kts +++ b/scope/build.gradle.kts @@ -1,5 +1,10 @@ +plugins { + be.theking90000.scope.`java-library-conventions` +} + dependencies { - testImplementation(platform("org.junit:junit-bom:6.1.0")) - testImplementation("org.junit.jupiter:junit-jupiter") - testRuntimeOnly("org.junit.platform:junit-platform-launcher") + testImplementation(platform(libs.junit.bom)) + testImplementation(libs.junit.jupiter) + + testRuntimeOnly(libs.junit.platform.launcher) } From e6b1694a99685ef7f1ef338e078b08f828360a00 Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:19:58 -0400 Subject: [PATCH 08/13] feat: add Maven publishing conventions precompiled script plugins --- .../maven-publishing-conventions.gradle.kts | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 buildSrc/src/main/kotlin/be/theking90000/scope/maven-publishing-conventions.gradle.kts diff --git a/buildSrc/src/main/kotlin/be/theking90000/scope/maven-publishing-conventions.gradle.kts b/buildSrc/src/main/kotlin/be/theking90000/scope/maven-publishing-conventions.gradle.kts new file mode 100644 index 0000000..9557146 --- /dev/null +++ b/buildSrc/src/main/kotlin/be/theking90000/scope/maven-publishing-conventions.gradle.kts @@ -0,0 +1,51 @@ +package be.theking90000.scope + +plugins { + `maven-publish` +} + +extensions.configure { + publications { + create("mavenJava") { + from(components["java"]) + + pom { + name = project.name + description = "Dependency injection utilities for Java." + url = "https://github.com/theking90000/scope" + + licenses { + license { + name = "MIT License" + url = "https://opensource.org/licenses/MIT" + } + } + + developers { + developer { + id = "theking90000" + name = "theking90000" + } + } + + scm { + connection = "scm:git:git://github.com/theking90000/scope.git" + developerConnection = "scm:git:ssh://github.com/theking90000/scope.git" + url = "https://github.com/theking90000/scope" + } + } + } + } + + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/theking90000/scope") + + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } +} From f3924a0d40d4f2846e4d38f1213a9228444c32a1 Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:20:03 -0400 Subject: [PATCH 09/13] chore: move Maven publishing and test configuration to precompiled script plugins --- build.gradle.kts | 62 ------------------------------------------ scope/build.gradle.kts | 9 ++++++ 2 files changed, 9 insertions(+), 62 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6a8047f..5e30b91 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,65 +15,3 @@ val resolvedVersion = allprojects { version = resolvedVersion } - -subprojects { - apply(plugin = "java-library") - apply(plugin = "maven-publish") - - extensions.configure { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 - - withSourcesJar() - withJavadocJar() - } - - tasks.withType().configureEach { - useJUnitPlatform() - } - - extensions.configure { - publications { - create("mavenJava") { - from(components["java"]) - - pom { - name = project.name - description = "Dependency injection utilities for Java." - url = "https://github.com/theking90000/scope" - - licenses { - license { - name = "MIT License" - url = "https://opensource.org/licenses/MIT" - } - } - - developers { - developer { - id = "theking90000" - name = "theking90000" - } - } - - scm { - connection = "scm:git:git://github.com/theking90000/scope.git" - developerConnection = "scm:git:ssh://github.com/theking90000/scope.git" - url = "https://github.com/theking90000/scope" - } - } - } - } - - repositories { - maven { - name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/theking90000/scope") - credentials { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") - } - } - } - } -} diff --git a/scope/build.gradle.kts b/scope/build.gradle.kts index 777baee..7b96dc5 100644 --- a/scope/build.gradle.kts +++ b/scope/build.gradle.kts @@ -1,5 +1,6 @@ plugins { be.theking90000.scope.`java-library-conventions` + be.theking90000.scope.`maven-publishing-conventions` } dependencies { @@ -8,3 +9,11 @@ dependencies { testRuntimeOnly(libs.junit.platform.launcher) } + +tasks { + test { + configureEach { + useJUnitPlatform() + } + } +} From 2b04af70a3bb83a393a644c83fa061eddd9a4ff8 Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:21:20 -0400 Subject: [PATCH 10/13] chore: simplify test task configuration in build script --- scope/build.gradle.kts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scope/build.gradle.kts b/scope/build.gradle.kts index 7b96dc5..b198bbd 100644 --- a/scope/build.gradle.kts +++ b/scope/build.gradle.kts @@ -12,8 +12,6 @@ dependencies { tasks { test { - configureEach { - useJUnitPlatform() - } + useJUnitPlatform() } } From f5de87c1066b7d1fddef656b5823301d31a7b9bf Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:24:45 -0400 Subject: [PATCH 11/13] chore: remove unused dependency updates plugin from build script --- build.gradle.kts | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 5e30b91..ea0187b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,5 @@ plugins { base - id("com.github.ben-manes.versions") version "0.54.0" } val defaultVersion = property("version").toString() From 614279af7c08a50905b5cc221c2b13f108cad2f2 Mon Sep 17 00:00:00 2001 From: kov3y Date: Fri, 26 Jun 2026 20:29:24 -0400 Subject: [PATCH 12/13] chore: update Java toolchain language version to 21 in base conventions script --- .../be/theking90000/scope/java-base-conventions.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/be/theking90000/scope/java-base-conventions.gradle.kts b/buildSrc/src/main/kotlin/be/theking90000/scope/java-base-conventions.gradle.kts index 2e805d9..c29ddc8 100644 --- a/buildSrc/src/main/kotlin/be/theking90000/scope/java-base-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/be/theking90000/scope/java-base-conventions.gradle.kts @@ -3,7 +3,7 @@ package be.theking90000.scope plugins.withType { extensions.getByType().apply { toolchain { - languageVersion = JavaLanguageVersion.of(17) + languageVersion = JavaLanguageVersion.of(21) } } } From 01f45d12e10beca516590b390d5c65ae96abf02a Mon Sep 17 00:00:00 2001 From: theking90000 Date: Sat, 27 Jun 2026 17:12:45 +0200 Subject: [PATCH 13/13] clarified README by removing non-existent gradle commands --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 23ba812..ecbd907 100644 --- a/README.md +++ b/README.md @@ -223,9 +223,3 @@ Every public type ships with thorough JavaDoc: The original in-depth reference, in French, is [`scope/README.md`](scope/README.md). -## Developers - -Check if dependencies are up to date: -```sh -./gradlew dependencyUpdates -``` \ No newline at end of file