[Git][java-team/gradle][master] 2 commits: Backported the refactored IvyArtifact classes from Gradle 4.8 to help building Kotlin

Emmanuel Bourg gitlab at salsa.debian.org
Thu Jun 27 14:07:25 BST 2019



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / gradle


Commits:
f6623d76 by Saif Abdul Cassim at 2019-06-27T12:51:54Z
Backported the refactored IvyArtifact classes from Gradle 4.8 to help building Kotlin

- - - - -
3bb72919 by Emmanuel Bourg at 2019-06-27T12:52:58Z
Upload to unstable

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/ivy-artifact-backport.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,15 @@
-gradle (4.4.1-7) UNRELEASED; urgency=medium
+gradle (4.4.1-7) unstable; urgency=medium
 
+  * Team upload.
+
+  [ Jongmin Kim ]
   * Use JRE provided xml-apis (Closes: #925586)
 
- -- Jongmin Kim <jmkim at pukyong.ac.kr>  Tue, 25 Jun 2019 11:32:22 +0200
+  [ Saif Abdul Cassim ]
+  * Backported the refactored IvyArtifact classes from Gradle 4.8
+    to help building Kotlin
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Thu, 27 Jun 2019 14:52:30 +0200
 
 gradle (4.4.1-6) unstable; urgency=medium
 


=====================================
debian/patches/ivy-artifact-backport.patch
=====================================
@@ -0,0 +1,224 @@
+Description: Backports the refactored IvyArtifact classes from Gradle 4.8 to help building Kotlin
+Origin: backport, https://github.com/gradle/gradle/commit/e076a783
+--- /dev/null
++++ b/subprojects/ivy/src/main/java/org/gradle/api/publish/ivy/internal/artifact/AbstractIvyArtifact.java
+@@ -0,0 +1,130 @@
++/*
++ * Copyright 2018 the original author or 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
++ *
++ *      http://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.
++ */
++
++package org.gradle.api.publish.ivy.internal.artifact;
++
++import com.google.common.base.Strings;
++import org.gradle.api.internal.tasks.AbstractTaskDependency;
++import org.gradle.api.internal.tasks.DefaultTaskDependency;
++import org.gradle.api.internal.tasks.TaskDependencyInternal;
++import org.gradle.api.internal.tasks.TaskDependencyResolveContext;
++import org.gradle.api.publish.ivy.IvyArtifact;
++import org.gradle.api.tasks.TaskDependency;
++
++import javax.annotation.Nullable;
++
++public abstract class AbstractIvyArtifact implements IvyArtifact {
++    private final TaskDependency allBuildDependencies;
++    private final DefaultTaskDependency additionalBuildDependencies;
++
++    private String name;
++    private String type;
++    private String extension;
++    private String classifier;
++    private String conf;
++
++    protected AbstractIvyArtifact() {
++        this.additionalBuildDependencies = new DefaultTaskDependency();
++        this.allBuildDependencies = new CompositeTaskDependency();
++    }
++
++    @Override
++    public String getName() {
++        return name != null ? name : getDefaultName();
++    }
++
++    protected abstract String getDefaultName();
++
++    @Override
++    public void setName(String name) {
++        this.name = Strings.nullToEmpty(name);
++    }
++
++    @Override
++    public String getType() {
++        return type != null ? type : getDefaultType();
++    }
++
++    protected abstract String getDefaultType();
++
++    @Override
++    public void setType(String type) {
++        this.type = Strings.nullToEmpty(type);
++    }
++
++    @Override
++    public String getExtension() {
++        return extension != null ? extension : getDefaultExtension();
++    }
++
++    protected abstract String getDefaultExtension();
++
++    @Override
++    public void setExtension(String extension) {
++        this.extension = Strings.nullToEmpty(extension);
++    }
++
++    @Nullable
++    @Override
++    public String getClassifier() {
++        return Strings.emptyToNull(classifier != null ? classifier : getDefaultClassifier());
++    }
++
++    protected abstract String getDefaultClassifier();
++
++    @Override
++    public void setClassifier(@Nullable String classifier) {
++        this.classifier = Strings.nullToEmpty(classifier);
++    }
++
++    @Nullable
++    @Override
++    public String getConf() {
++        return Strings.emptyToNull(conf != null ? conf : getDefaultConf());
++    }
++
++    protected abstract String getDefaultConf();
++
++    @Override
++    public void setConf(@Nullable String conf) {
++        this.conf = Strings.nullToEmpty(conf);
++    }
++
++    @Override
++    public void builtBy(Object... tasks) {
++        additionalBuildDependencies.add(tasks);
++    }
++
++    @Override
++    public TaskDependency getBuildDependencies() {
++        return allBuildDependencies;
++    }
++
++    protected abstract TaskDependencyInternal getDefaultBuildDependencies();
++
++    @Override
++    public String toString() {
++        return String.format("%s %s:%s:%s:%s", getClass().getSimpleName(), getName(), getType(), getExtension(), getClassifier());
++    }
++
++    private class CompositeTaskDependency extends AbstractTaskDependency {
++        @Override
++        public void visitDependencies(TaskDependencyResolveContext context) {
++            getDefaultBuildDependencies().visitDependencies(context);
++            additionalBuildDependencies.visitDependencies(context);
++        }
++    }
++}
+--- /dev/null
++++ b/subprojects/ivy/src/main/java/org/gradle/api/publish/ivy/internal/artifact/FileBasedIvyArtifact.java
+@@ -0,0 +1,86 @@
++/*
++ * Copyright 2018 the original author or 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
++ *
++ *      http://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.
++ */
++
++package org.gradle.api.publish.ivy.internal.artifact;
++
++import com.google.common.io.Files;
++import org.gradle.api.Task;
++import org.gradle.api.internal.tasks.TaskDependencyInternal;
++import org.gradle.api.internal.tasks.TaskDependencyResolveContext;
++import org.gradle.api.tasks.TaskDependency;
++
++import javax.annotation.Nullable;
++import java.util.Collections;
++import java.util.Set;
++import org.gradle.api.publish.ivy.internal.publisher.IvyPublicationIdentity;
++
++import java.io.File;
++
++public class FileBasedIvyArtifact extends AbstractIvyArtifact {
++    private final File file;
++    private final String extension;
++    private final IvyPublicationIdentity identity;
++
++    public FileBasedIvyArtifact(File file, IvyPublicationIdentity identity) {
++        this.file = file;
++        extension = Files.getFileExtension(file.getName());
++        this.identity = identity;
++    }
++
++    @Override
++    protected String getDefaultName() {
++        return identity.getModule();
++    }
++
++    @Override
++    protected String getDefaultType() {
++        return extension;
++    }
++
++    @Override
++    protected String getDefaultExtension() {
++        return extension;
++    }
++
++    @Override
++    protected String getDefaultClassifier() {
++        return null;
++    }
++
++    @Override
++    protected String getDefaultConf() {
++        return null;
++    }
++
++    @Override
++    protected TaskDependencyInternal getDefaultBuildDependencies() {
++        return new TaskDependencyInternal() {
++        @Override
++        public Set<? extends Task> getDependencies(@Nullable Task task) {
++            return Collections.emptySet();
++        }
++
++        @Override
++        public void visitDependencies(TaskDependencyResolveContext context) {
++        }
++};
++    }
++
++    @Override
++    public File getFile() {
++        return file;
++    }
++}


=====================================
debian/patches/series
=====================================
@@ -26,3 +26,4 @@ disable-google-apis.patch
 disable-internal-android-performance-testing.patch
 java11-compatibility.patch
 asm7.patch
+ivy-artifact-backport.patch



View it on GitLab: https://salsa.debian.org/java-team/gradle/compare/47973ee2bc76eaf20b1f7368422b71bc4fcd8a79...3bb729198ab94fcdedd3a9d3da52ae609fceb373

-- 
View it on GitLab: https://salsa.debian.org/java-team/gradle/compare/47973ee2bc76eaf20b1f7368422b71bc4fcd8a79...3bb729198ab94fcdedd3a9d3da52ae609fceb373
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190627/3cc3721f/attachment.html>


More information about the pkg-java-commits mailing list