Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#801 Support Gradle 8.12 #817

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 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.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.palantir.gradle.docker;

// CHECKSTYLE:OFF

import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
Expand All @@ -28,8 +29,8 @@
import org.gradle.api.attributes.AttributeContainer;
import org.gradle.api.attributes.Usage;
import org.gradle.api.capabilities.Capability;
import org.gradle.api.internal.attributes.AttributesFactory;
import org.gradle.api.internal.attributes.ImmutableAttributes;
import org.gradle.api.internal.attributes.ImmutableAttributesFactory;
import org.gradle.api.internal.component.SoftwareComponentInternal;
import org.gradle.api.internal.component.UsageContext;
import org.gradle.api.model.ObjectFactory;
Expand All @@ -44,7 +45,7 @@ public DockerComponent(
PublishArtifact dockerArtifact,
DependencySet runtimeDependencies,
ObjectFactory objectFactory,
ImmutableAttributesFactory attributesFactory) {
AttributesFactory attributesFactory) {
artifacts.add(dockerArtifact);
this.runtimeDependencies = runtimeDependencies;
Usage usage = objectFactory.named(Usage.class, Usage.JAVA_RUNTIME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
*/
package com.palantir.gradle.docker

import java.util.regex.Pattern
import javax.inject.Inject
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.PublishArtifact
import org.gradle.api.internal.attributes.ImmutableAttributesFactory
import org.gradle.api.internal.attributes.AttributesFactory
import org.gradle.api.logging.LogLevel
import org.gradle.api.logging.Logger
import org.gradle.api.logging.Logging
Expand All @@ -33,16 +31,19 @@ import org.gradle.api.tasks.Delete
import org.gradle.api.tasks.Exec
import org.gradle.api.tasks.bundling.Zip

import javax.inject.Inject
import java.util.regex.Pattern

class PalantirDockerPlugin implements Plugin<Project> {

private static final Logger log = Logging.getLogger(PalantirDockerPlugin.class)
private static final Pattern LABEL_KEY_PATTERN = Pattern.compile('^[a-z0-9.-]*$')

private final ObjectFactory objectFactory
private final ImmutableAttributesFactory attributesFactory
private final AttributesFactory attributesFactory

@Inject
PalantirDockerPlugin(ObjectFactory objectFactory, ImmutableAttributesFactory attributesFactory) {
PalantirDockerPlugin(ObjectFactory objectFactory, AttributesFactory attributesFactory) {
this.objectFactory = objectFactory
this.attributesFactory = attributesFactory
}
Expand Down