Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Gradle 6.0 compatibility by removing deprecated API #171

Open
wants to merge 4 commits into
base: master
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
28 changes: 18 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'com.gradle.build-scan' version '1.8'
id "com.gradle.plugin-publish" version "0.9.4"
id "com.jfrog.bintray" version "1.6"
id 'com.gradle.build-scan' version '2.2.1'
id "com.gradle.plugin-publish" version "0.10.1"
id "com.jfrog.bintray" version "1.8.4"
}
apply plugin: 'groovy'
apply plugin: 'maven'
Expand All @@ -10,8 +10,8 @@ apply plugin: 'signing'
apply plugin: 'jacoco'
apply plugin: 'project-report'

sourceCompatibility = 1.6
targetCompatibility = 1.6
sourceCompatibility = 1.7
targetCompatibility = 1.7

defaultTasks 'clean', 'build'

Expand All @@ -21,8 +21,8 @@ ext.archivesBaseName = 'gradle-js-plugin'
ext.isSnapshot = version.endsWith("-SNAPSHOT")

buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}

repositories {
Expand Down Expand Up @@ -143,15 +143,15 @@ test {
}

jacoco {
toolVersion = "0.7.6.201602180812"
toolVersion = "0.8.3"
reportsDir = file("$buildDir/customJacocoReportDir")
}

jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
html.destination file("${buildDir}/jacocoHtml")
}
}

Expand Down Expand Up @@ -238,6 +238,14 @@ def getPomConfiguration() {
// download dependencies all at once, keeps downloads out of travis output
task resolveAllDependencies {
doLast {
configurations.all { it.resolve() }
configurations.all { configuration ->
if (configuration.isCanBeResolved()) {
println "Resolving $configuration"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use logger.info instead of println?

configuration.resolve()
}
else {
println "$configuration is not resolvable"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use logger.info instead of println?

}
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.eriwen.gradle.js.source.JavaScriptSourceSetContainer;
import org.gradle.api.Project;
import org.gradle.api.internal.AbstractNamedDomainObjectContainer;
import org.gradle.api.internal.CollectionCallbackActionDecorator;
import org.gradle.api.internal.file.FileResolver;
import org.gradle.internal.reflect.Instantiator;

Expand All @@ -14,7 +15,7 @@ public class DefaultJavaScriptSourceSetContainer extends AbstractNamedDomainObje
private final FileResolver fileResolver;

public DefaultJavaScriptSourceSetContainer(Project project, Instantiator instantiator, FileResolver fileResolver) {
super(JavaScriptSourceSet.class, instantiator);
super(JavaScriptSourceSet.class, instantiator, CollectionCallbackActionDecorator.NOOP);
this.project = project;
this.instantiator = instantiator;
this.fileResolver = fileResolver;
Expand Down