Skip to content

Commit

Permalink
Upgrade plugin to gradle 6.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Azurelol committed Apr 22, 2021
1 parent a8e30b7 commit 5f1671d
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 18 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

plugins {
id "net.wooga.plugins" version "1.5.0"
id "net.wooga.plugins" version "2.0.0"
}

group 'net.wooga.gradle'
Expand Down Expand Up @@ -65,9 +65,9 @@ github {
}

dependencies {
testCompile('org.jfrog.artifactory.client:artifactory-java-client-services:2.+') {
testImplementation('org.jfrog.artifactory.client:artifactory-java-client-services:2.+') {
exclude module: 'logback-classic'
}

compile('com.google.guava:guava:19.0')
implementation('com.google.guava:guava:19.0')
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
31 changes: 28 additions & 3 deletions gradle_check_versions.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
#!/usr/bin/env bash

versions=("4.0" "4.1" "4.2" "4.3" "4.4" "4.5" "4.6" "4.7" "4.8" "4.9" "4.10")
#
# Copyright 2018-2021 Wooga GmbH
#
# 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.
#

versions=("5.0" "5.1" "5.2" "5.3" "5.4" "5.5" "5.6.4" "6.0" "6.1" "6.2" "6.3" "6.4" "6.5" "6.6" "6.7")

rm -fr build/reports
for i in "${versions[@]}"
do
echo "test gradle version $i"
GRADLE_VERSION=$i ./gradlew test &> /dev/null
status=$?
mkdir -p "build/reports/$i"
mv build/reports/test "build/reports/$i"
if [ $status -ne 0 ]; then
echo "test error $i"
fi

GRADLE_VERSION=$i ./gradlew integrationTest &> /dev/null
status=$?
mkdir -p "build/reports/$i"
mv build/reports/integrationTest "build/reports/$i"
if [ $status -ne 0 ]; then
echo "test error $i"
echo "integrationTest error $i"
fi
done
done
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import org.gradle.api.internal.project.ProjectInternal
import org.gradle.api.plugins.ExtensionAware
import org.gradle.api.specs.Spec
import org.gradle.api.tasks.Delete
import org.gradle.buildinit.tasks.internal.TaskConfiguration
import org.gradle.internal.reflect.Instantiator
import org.gradle.language.base.plugins.LifecycleBasePlugin
import wooga.gradle.paket.base.dependencies.internal.DefaultPaketDependencyHandler
Expand All @@ -54,6 +53,8 @@ class PaketBasePlugin implements Plugin<Project> {
static final String PAKET_DEPENDENCIES_TASK_NAME = "paketDependencies"
static final String PAKET_CONFIGURATION = "nupkg"

static final String TASK_GROUP_NAME = "Build Setup"

@Override
void apply(Project project) {
this.project = project
Expand Down Expand Up @@ -129,7 +130,7 @@ class PaketBasePlugin implements Plugin<Project> {
}

private static void addInitTask(final Project project, PaketPluginExtension extension) {
final task = project.tasks.create(name: INIT_TASK_NAME, type: PaketInit, group: TaskConfiguration.GROUP)
final task = project.tasks.create(name: INIT_TASK_NAME, type: PaketInit, group: TASK_GROUP_NAME)
task.conventionMapping.map("dependenciesFile", { extension.getPaketDependenciesFile() })
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package wooga.gradle.paket.base.dependencies.internal
import org.gradle.api.Action
import org.gradle.api.Named
import org.gradle.api.internal.AbstractNamedDomainObjectContainer
import org.gradle.api.internal.CollectionCallbackActionDecorator;
import org.gradle.internal.Actions
import org.gradle.internal.reflect.DirectInstantiator
import org.gradle.internal.reflect.Instantiator
Expand All @@ -34,7 +35,7 @@ class DefaultPaketDependencyConfiguration extends AbstractNamedDomainObjectConta
private final PaketDependencyFactory dependencyFactory

DefaultPaketDependencyConfiguration(final String name, Instantiator instantiator = null) {
super(PaketDependency.class, instantiator ?: DirectInstantiator.INSTANCE)
super(PaketDependency.class, instantiator ?: DirectInstantiator.INSTANCE, CollectionCallbackActionDecorator.NOOP)
this.name = name
this.dependencyFactory = instantiator.newInstance(PaketDependencyFactory, instantiator)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package wooga.gradle.paket.base.dependencies.internal

import org.gradle.api.internal.AbstractNamedDomainObjectContainer
import org.gradle.api.internal.CollectionCallbackActionDecorator;
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Nested
import org.gradle.internal.reflect.Instantiator
Expand All @@ -29,12 +30,12 @@ class DefaultPaketDependencyConfigurationContainer extends AbstractNamedDomainOb
private final Instantiator instantiator

DefaultPaketDependencyConfigurationContainer(final Instantiator instantiator) {
super(PaketDependencyConfiguration.class, instantiator)
super(PaketDependencyConfiguration.class, instantiator, CollectionCallbackActionDecorator.NOOP)
this.instantiator = instantiator
}

@Override
protected PaketDependencyConfiguration doCreate(String name) {
instantiator.newInstance(DefaultPaketDependencyConfiguration.class, name, instantiator)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ package wooga.gradle.paket.base.repository.internal

import com.google.common.collect.Lists
import groovy.transform.EqualsAndHashCode
import org.gradle.api.Action
import org.gradle.api.artifacts.repositories.AuthenticationContainer
import org.gradle.api.artifacts.repositories.RepositoryContentDescriptor
import org.gradle.api.credentials.Credentials
import org.gradle.api.internal.artifacts.repositories.AuthenticationSupporter
import org.gradle.api.internal.file.FileResolver
import org.gradle.api.tasks.Input
Expand Down Expand Up @@ -108,4 +111,14 @@ class DefaultNugetArtifactRepository implements NugetArtifactRepository {
void setName(String name) {
this.name = name
}

@Override
void content(Action<? super RepositoryContentDescriptor> action) {

}

@Override
void credentials(Class<? extends Credentials> aClass) {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ import org.gradle.internal.authentication.DefaultAuthenticationContainer
import org.gradle.internal.authentication.DefaultBasicAuthentication
import org.gradle.internal.reflect.Instantiator
import org.gradle.util.ConfigureUtil
import org.gradle.api.internal.CollectionCallbackActionDecorator;
import wooga.gradle.paket.base.repository.NugetRepositoryHandlerConvention
import wooga.gradle.paket.base.repository.NugetArtifactRepository


class DefaultNugetArtifactRepositoryHandlerConvention implements NugetRepositoryHandlerConvention<NugetArtifactRepository> {

private final DefaultArtifactRepositoryContainer handler
Expand Down Expand Up @@ -62,7 +64,7 @@ class DefaultNugetArtifactRepositoryHandlerConvention implements NugetRepository
}

protected AuthenticationContainer createAuthenticationContainer() {
DefaultAuthenticationContainer container = instantiator.newInstance(DefaultAuthenticationContainer.class, instantiator)
DefaultAuthenticationContainer container = instantiator.newInstance(DefaultAuthenticationContainer.class, instantiator, CollectionCallbackActionDecorator.NOOP)

container.registerBinding(BasicAuthentication.class, DefaultBasicAuthentication.class)
return container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ abstract class AbstractPaketTask<T extends AbstractPaketTask> extends Convention
@Internal
protected Boolean supportLogfile = true

@Input
@InputFile
File executable

@Optional
@Input
String monoExecutable

@Optional
@Input
@InputFile
File getLogFile() {
return logFile ? project.file(logFile) : null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class PaketPackPlugin implements Plugin<Project> {
final extension = project.extensions.create(EXTENSION_NAME, DefaultPaketPackPluginExtension, project, baseExtension.dependencyHandler)

final configuration = project.configurations.getByName(PaketBasePlugin.PAKET_CONFIGURATION)
final templateFiles = project.fileTree(project.projectDir)
def templateFiles = project.fileTree(project.projectDir)
templateFiles.include PAKET_TEMPLATE_PATTERN
templateFiles = templateFiles.sort()
templateFiles = templateFiles.sort(true, new Comparator<File>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package wooga.gradle.paket.publish.repository.internal

import org.gradle.api.Action
import org.gradle.api.artifacts.repositories.RepositoryContentDescriptor
import wooga.gradle.paket.publish.repository.NugetArtifactRepository

class NugetRepository implements NugetArtifactRepository {
Expand Down Expand Up @@ -59,5 +61,8 @@ class NugetRepository implements NugetArtifactRepository {
path ? path : url
}

@Override
void content(Action<? super RepositoryContentDescriptor> action) {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.gradle.api.file.FileVisitDetails
import org.gradle.api.file.FileVisitor
import org.gradle.api.internal.ConventionTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
Expand Down Expand Up @@ -56,13 +57,13 @@ class PaketUnityInstall extends ConventionTask {
/**
* @return the path to a {@code paket.unity3d.references} file
*/
@Input
@InputFile
File referencesFile

/**
* @return the path to a {@code paket.lock} file
*/
@Input
@InputFile
File lockFile

/**
Expand Down

0 comments on commit 5f1671d

Please sign in to comment.