Skip to content

Commit

Permalink
Merge pull request #17 from pedrolamarao/feature/gradle-8.4
Browse files Browse the repository at this point in the history
Update Gradle to 8.4 and apply new "locked" configurations
  • Loading branch information
pedrolamarao authored Sep 29, 2023
2 parents 236d27c + f8727be commit 701bed1
Show file tree
Hide file tree
Showing 20 changed files with 31 additions and 36 deletions.
3 changes: 2 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ subprojects {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});

Expand Down
2 changes: 1 addition & 1 deletion samples/application-asm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/application-c/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/application-cxx/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/application-mixed/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/archive-asm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/archive-c/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/archive-cxx/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/archive-mixed/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/bare-metal-multiboot2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ tasks.assemble.configure {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/dependency-on-external-prebuilt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/dependency-on-subproject-headers/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
2 changes: 1 addition & 1 deletion samples/dependency-on-subproject-modules/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ plugins {
}

tasks.wrapper.configure {
gradleVersion = "8.3"
gradleVersion = "8.4-rc-2"
}
6 changes: 6 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
// Copyright (c) Pedro Lamarão <pedro.lamarao@gmail.com>. All rights reserved.

dependencyResolutionManagement {
repositories {
mavenCentral()
}
}

rootProject.name = "gradle-metal"

include("plugins")

0 comments on commit 701bed1

Please sign in to comment.