Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
adeca40
Fix: remove hard dependencies from platform
jjohannes Feb 18, 2026
dd2ff00
Build: turn on dependency definition in module-info (test-support)
jjohannes Feb 18, 2026
eb3af41
Build: turn on dependency definition in module-info (jablib)
jjohannes Feb 18, 2026
47163bd
Build: add dependency analysis tasks
jjohannes Feb 18, 2026
e2346e2
Build: add missing mapping
jjohannes Feb 20, 2026
5f97142
Build: remove duplication
jjohannes Feb 20, 2026
7b0ac43
Build: add back com.fasterxml.aalto
jjohannes Feb 20, 2026
72558de
Merge branch 'main' into reduce-complexity-in-dependencies-setup
koppor Feb 20, 2026
699b291
Build: cleanup some patch rules
jjohannes Feb 20, 2026
f908266
Build: address dependency analysis results
jjohannes Feb 20, 2026
196e4e9
Build: add missing dependency
jjohannes Feb 20, 2026
a2dcb13
Build: remove use of 'kotlin.ranges.IntRange'
jjohannes Feb 20, 2026
8cd99f0
Build: activate consistent resolution for target specific resolution
jjohannes Feb 20, 2026
d0895a6
Build: open 'com.sun.javafx.beans' for testing
jjohannes Feb 20, 2026
9d099ac
ci: update TestLens
jjohannes Feb 20, 2026
8898165
tmp: disable tests for overview
jjohannes Feb 20, 2026
4a37f2a
fix: off-by-one-error
jjohannes Feb 20, 2026
cef941a
build: handle jdk-jsobject issue centrally by metadata rule
jjohannes Feb 20, 2026
88ae458
build: remove redundant dependencies from 'jabkit'
jjohannes Feb 20, 2026
e52d235
build: central mockitoAgent setup
jjohannes Feb 20, 2026
c5e7745
build: refine patch rules
jjohannes Feb 20, 2026
06e1a7b
build: remove redundant dependencies from jabgui
jjohannes Feb 20, 2026
bb74507
build: use default config for patch rules where possible
jjohannes Feb 20, 2026
c3b0fda
build: target specific classpaths need the TARGET_JVM_VERSION_ATTRIBUTE
jjohannes Feb 20, 2026
ff15f28
build: remove redundant dependencies from jabls
jjohannes Feb 20, 2026
a3f953d
build: remove redundant dependencies from jabls-cli
jjohannes Feb 20, 2026
3d0a587
build: remove redundant dependencies from jabsrv
jjohannes Feb 20, 2026
689bf25
build: remove redundant dependencies from jabsrv-cli
jjohannes Feb 20, 2026
589e47a
build: use default config in more patch rules
jjohannes Feb 20, 2026
6c6869f
build: clarifying comments
jjohannes Feb 20, 2026
d93fa85
build: define dependency check in separate file
jjohannes Feb 20, 2026
5e1d114
ci: add pipeline step to check dependency scopes
jjohannes Feb 20, 2026
18dd9df
tmp: reactivate tests
jjohannes Feb 20, 2026
fa884e4
tmp: align mockito agent version
jjohannes Feb 20, 2026
43e2f69
build: remove redundant module name definition
jjohannes Feb 20, 2026
4cd72a8
build: consistently use '='
jjohannes Feb 20, 2026
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
2 changes: 1 addition & 1 deletion .github/actions/setup-gradle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
env:
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
- name: Setup TestLens
uses: testlens-app/setup-testlens@v1.6.1
uses: testlens-app/setup-testlens@v1.7.0
- name: Generate JBang cache key
id: cache-key
shell: bash
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/tests-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ jobs:
- name: Run checkstyle using gradle
run: gradle checkstyleMain checkstyleTest checkstyleJmh

dependencyscopes:
name: Dependency Scopes
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v6
with:
submodules: 'true'
show-progress: 'false'
- uses: ./.github/actions/setup-gradle
- name: Run checkAllModuleInfo using gradle
run: gradle checkAllModuleInfo

openrewrite:
name: OpenRewrite
runs-on: ubuntu-slim
Expand Down
55 changes: 55 additions & 0 deletions build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import org.gradle.api.artifacts.*
import org.gradle.api.attributes.java.TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE
import org.gradle.api.model.ObjectFactory
import org.gradle.kotlin.dsl.named
import org.gradle.nativeplatform.MachineArchitecture.ARCHITECTURE_ATTRIBUTE
import org.gradle.nativeplatform.OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE
import javax.inject.Inject

// Based on: https://github.com/gradlex-org/jvm-dependency-conflict-resolution/blob/main/src/main/java/org/gradlex/jvm/dependency/conflict/resolution/rules/AddTargetPlatformVariantsMetadataRule.java
@CacheableRule
abstract class JDKjsobjectDependencyMetadataRule @Inject constructor(
private val classifier: String,
private val operatingSystem: String,
private val architecture: String,
private val minJavaVersion: Int
) : ComponentMetadataRule {

@get:Inject
protected abstract val objects: ObjectFactory

override fun execute(context: ComponentMetadataContext) {
val details = context.details
addTargetPlatformVariant(details, "Compile", "compile")
addTargetPlatformVariant(details, "Runtime", "runtime")
}

private fun addTargetPlatformVariant(details: ComponentMetadataDetails, nameSuffix: String, baseVariant: String) {
val name = details.id.name
val version = details.id.version

details.addVariant(classifier + nameSuffix + minJavaVersion, baseVariant) {
configureAttributes()
withFiles {
removeAllFiles()
addFile("$name-$version-$classifier.jar")
}
// depending on the JDK version, 'jsobject' is pulled in as extra dependency or not
withDependencies {
if (minJavaVersion >= 26) {
add("org.openjfx:jdk-jsobject")
} else {
removeIf { it.name == "jdk-jsobject" }
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is solving the jsobject "issue" in a way @koppor and I talked about when this came up on slack. In theory, JavaFx could publish metadata that allows Gradle to automatically make a better decission.
This rule class is adding this metadata, which allows us to remove the copy-paste solution from individual build Gradle files.

}
}
}

private fun VariantMetadata.configureAttributes() {
attributes {
attributes.attribute(OPERATING_SYSTEM_ATTRIBUTE, objects.named(operatingSystem))
attributes.attribute(ARCHITECTURE_ATTRIBUTE, objects.named(architecture))
attributes.attribute(TARGET_JVM_VERSION_ATTRIBUTE, minJavaVersion)
}
}
}
Loading
Loading