diff --git a/README.adoc b/README.adoc index 7340ffb..bb72d18 100644 --- a/README.adoc +++ b/README.adoc @@ -13,10 +13,11 @@ Features: [WARNING] This project is under early development; compatibility *will be broken* without prior notice. +In particular, we aim to stabilize our Gradle dependency on future version 9. Requirements: -* Gradle 8.3 or newer +* Gradle 8.4 or newer * JDK 17 or newer * LLVM 16 or newer (with clang, clang-scan-deps, lld, llvm-ar etc.) diff --git a/build.gradle.kts b/build.gradle.kts index 58a6a8f..3ffdd92 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,5 +13,5 @@ subprojects { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 033e24c..7f93135 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac72c34..98ea390 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index fcb6fca..0adc8e1 100755 --- a/gradlew +++ b/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/plugins/src/main/java/br/dev/pedrolamarao/gradle/metal/base/MetalBasePlugin.java b/plugins/src/main/java/br/dev/pedrolamarao/gradle/metal/base/MetalBasePlugin.java index 154eac6..7efcf02 100644 --- a/plugins/src/main/java/br/dev/pedrolamarao/gradle/metal/base/MetalBasePlugin.java +++ b/plugins/src/main/java/br/dev/pedrolamarao/gradle/metal/base/MetalBasePlugin.java @@ -32,36 +32,23 @@ public void apply (Project project) final var configurations = project.getConfigurations(); final var tasks = project.getTasks(); - configurations.create(COMMANDS_ELEMENTS, configuration -> - { - configuration.setCanBeConsumed(true); - configuration.setCanBeResolved(false); + configurations.consumable(COMMANDS_ELEMENTS, configuration -> { configuration.attributes(it -> it.attribute(MetalCapability.ATTRIBUTE, MetalCapability.COMMANDS)); }); - final var nativeImplementation = configurations.create("nativeImplementation",configuration -> { - configuration.setCanBeConsumed(true); - configuration.setCanBeResolved(false); - }); + final var nativeImplementation = configurations.dependencyScope("nativeImplementation"); - configurations.create(EMPTY_ELEMENTS, configuration -> { + configurations.consumable(EMPTY_ELEMENTS, configuration -> { configuration.attributes(it -> it.attribute(MetalCapability.ATTRIBUTE, MetalCapability.NONE)); - configuration.setCanBeConsumed(true); - configuration.setCanBeDeclared(false); - configuration.setCanBeResolved(false); configuration.setVisible(false); }); - configurations.create(LINKABLE_DEPENDENCIES, configuration -> { - configuration.setCanBeConsumed(false); - configuration.setCanBeResolved(true); + configurations.resolvable(LINKABLE_DEPENDENCIES, configuration -> { configuration.attributes(it -> it.attribute(MetalCapability.ATTRIBUTE, MetalCapability.LINKABLE)); - configuration.extendsFrom(nativeImplementation); + configuration.extendsFrom(nativeImplementation.get()); }); - configurations.create(LINKABLE_ELEMENTS, configuration -> { - configuration.setCanBeConsumed(true); - configuration.setCanBeResolved(false); + configurations.consumable(LINKABLE_ELEMENTS, configuration -> { configuration.attributes(it -> it.attribute(MetalCapability.ATTRIBUTE, MetalCapability.LINKABLE)); }); diff --git a/samples/application-asm/build.gradle.kts b/samples/application-asm/build.gradle.kts index a174560..4abe173 100644 --- a/samples/application-asm/build.gradle.kts +++ b/samples/application-asm/build.gradle.kts @@ -4,5 +4,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/application-c/build.gradle.kts b/samples/application-c/build.gradle.kts index f4835d9..163ffdb 100644 --- a/samples/application-c/build.gradle.kts +++ b/samples/application-c/build.gradle.kts @@ -4,5 +4,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/application-cxx/build.gradle.kts b/samples/application-cxx/build.gradle.kts index 691bc72..6e848d7 100644 --- a/samples/application-cxx/build.gradle.kts +++ b/samples/application-cxx/build.gradle.kts @@ -4,5 +4,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/application-mixed/build.gradle.kts b/samples/application-mixed/build.gradle.kts index a59e791..de6d5b6 100644 --- a/samples/application-mixed/build.gradle.kts +++ b/samples/application-mixed/build.gradle.kts @@ -6,5 +6,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/archive-asm/build.gradle.kts b/samples/archive-asm/build.gradle.kts index 841908a..f091009 100644 --- a/samples/archive-asm/build.gradle.kts +++ b/samples/archive-asm/build.gradle.kts @@ -4,5 +4,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/archive-c/build.gradle.kts b/samples/archive-c/build.gradle.kts index c888958..aefe99c 100644 --- a/samples/archive-c/build.gradle.kts +++ b/samples/archive-c/build.gradle.kts @@ -4,5 +4,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/archive-cxx/build.gradle.kts b/samples/archive-cxx/build.gradle.kts index fbbe402..22ce9f6 100644 --- a/samples/archive-cxx/build.gradle.kts +++ b/samples/archive-cxx/build.gradle.kts @@ -4,5 +4,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/archive-mixed/build.gradle.kts b/samples/archive-mixed/build.gradle.kts index 4627f23..8a21339 100644 --- a/samples/archive-mixed/build.gradle.kts +++ b/samples/archive-mixed/build.gradle.kts @@ -6,5 +6,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/bare-metal-multiboot2/build.gradle.kts b/samples/bare-metal-multiboot2/build.gradle.kts index 2437913..86c2c8a 100644 --- a/samples/bare-metal-multiboot2/build.gradle.kts +++ b/samples/bare-metal-multiboot2/build.gradle.kts @@ -34,5 +34,5 @@ tasks.assemble.configure { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/dependency-on-external-cmake-ninja/build.gradle.kts b/samples/dependency-on-external-cmake-ninja/build.gradle.kts index f7889fa..fde90f7 100644 --- a/samples/dependency-on-external-cmake-ninja/build.gradle.kts +++ b/samples/dependency-on-external-cmake-ninja/build.gradle.kts @@ -3,5 +3,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/dependency-on-external-prebuilt/build.gradle.kts b/samples/dependency-on-external-prebuilt/build.gradle.kts index f7889fa..fde90f7 100644 --- a/samples/dependency-on-external-prebuilt/build.gradle.kts +++ b/samples/dependency-on-external-prebuilt/build.gradle.kts @@ -3,5 +3,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/dependency-on-subproject-headers/build.gradle.kts b/samples/dependency-on-subproject-headers/build.gradle.kts index f7889fa..fde90f7 100644 --- a/samples/dependency-on-subproject-headers/build.gradle.kts +++ b/samples/dependency-on-subproject-headers/build.gradle.kts @@ -3,5 +3,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/samples/dependency-on-subproject-modules/build.gradle.kts b/samples/dependency-on-subproject-modules/build.gradle.kts index f7889fa..fde90f7 100644 --- a/samples/dependency-on-subproject-modules/build.gradle.kts +++ b/samples/dependency-on-subproject-modules/build.gradle.kts @@ -3,5 +3,5 @@ plugins { } tasks.wrapper.configure { - gradleVersion = "8.3" + gradleVersion = "8.4-rc-2" } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index c37b1ec..72ec9bc 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,11 @@ // Copyright (c) Pedro LamarĂ£o . All rights reserved. +dependencyResolutionManagement { + repositories { + mavenCentral() + } +} + rootProject.name = "gradle-metal" include("plugins") \ No newline at end of file