Skip to content

Commit

Permalink
Gradle 8.5-rc-1
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Nov 10, 2023
1 parent 39f531a commit 2792526
Show file tree
Hide file tree
Showing 21 changed files with 98 additions and 122 deletions.
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.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-rc-1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ class AbstractAlignAndMigrateSpec extends AbstractAlignRulesSpec {
implementation 'other:e:4.0.0'
}
""".stripIndent()

debug = true
}

private void createTestDependencies() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package nebula.plugin.resolutionrules

import nebula.test.IntegrationTestKitSpec

abstract class AbstractAlignRulesSpec extends IntegrationTestKitSpec {
abstract class AbstractAlignRulesSpec extends AbstractIntegrationTestKitSpec {
def rulesJsonFile

def setup() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package nebula.plugin.resolutionrules

import nebula.test.IntegrationTestKitSpec

abstract class AbstractIntegrationTestKitSpec extends IntegrationTestKitSpec {
def setup() {

}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package nebula.plugin.resolutionrules

import nebula.test.IntegrationTestKitSpec

class AbstractRulesWithSpringBootPluginSpec extends IntegrationTestKitSpec {
class AbstractRulesWithSpringBootPluginSpec extends AbstractIntegrationTestKitSpec {
File rulesJsonFile

def setup() {
rulesJsonFile = new File(projectDir, "rules.json")

debug = true
keepFiles = true
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package nebula.plugin.resolutionrules

import nebula.test.IntegrationTestKitSpec
import nebula.test.dependencies.DependencyGraphBuilder
import nebula.test.dependencies.GradleDependencyGenerator
import nebula.test.dependencies.ModuleBuilder
import spock.lang.Ignore
import spock.lang.Unroll

class AlignAndLockWithDowngradedTransitiveDependenciesSpec extends IntegrationTestKitSpec {
class AlignAndLockWithDowngradedTransitiveDependenciesSpec extends AbstractIntegrationTestKitSpec {
def rulesJsonFile
static def STATIC_MAJOR_MINOR_PATCH_2_9_9 = "2.9.9"
static def STATIC_MAJOR_MINOR_PATCH_MICRO_PATCH_2_9_9_3 = "2.9.9.3"
Expand Down Expand Up @@ -36,9 +35,10 @@ class AlignAndLockWithDowngradedTransitiveDependenciesSpec extends IntegrationTe
resolutionRules files('$rulesJsonFile')
}
""".stripIndent()
// TODO: enable once nebula lock is ready for config cache
new File(projectDir, 'gradle.properties').text = '''org.gradle.configuration-cache=false'''.stripIndent()

keepFiles = true
debug = true

rulesJsonFile << jacksonAlignmentAndSubstitutionRule()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package nebula.plugin.resolutionrules

import nebula.test.IntegrationTestKitSpec
import nebula.test.dependencies.DependencyGraphBuilder
import nebula.test.dependencies.GradleDependencyGenerator
import nebula.test.dependencies.ModuleBuilder
Expand All @@ -10,7 +9,7 @@ import nebula.test.dependencies.repositories.MavenRepo
import spock.lang.Ignore
import spock.lang.Issue

class AlignAndSubstituteRulesSpec extends IntegrationTestKitSpec {
class AlignAndSubstituteRulesSpec extends AbstractIntegrationTestKitSpec {
File rulesJsonFile
File mavenrepo
String reason = "★ custom reason"
Expand Down Expand Up @@ -75,8 +74,6 @@ class AlignAndSubstituteRulesSpec extends IntegrationTestKitSpec {
mavenrepo = new GradleDependencyGenerator(graph, "${projectDir}/testrepogen").generateTestMavenRepo()

buildFile << baseBuildGradleFile()

debug = true
keepFiles = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class AlignAndSubstituteRulesWithSpringBoot1xPluginSpec extends AbstractRulesWit
def setup() {
System.setProperty('ignoreDeprecations', 'true')
rulesJsonFile = new File(projectDir, "rules.json")

debug = true
keepFiles = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab

def setup() {
rulesJsonFile = new File(projectDir, "rules.json")

debug = true
keepFiles = true
System.setProperty('ignoreDeprecations', 'true')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec extend

def setup() {
rulesJsonFile = new File(projectDir, "rules.json")

debug = true
keepFiles = true
System.setProperty('ignoreDeprecations', 'true')
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
package nebula.plugin.resolutionrules

import nebula.test.IntegrationTestKitSpec
import nebula.test.dependencies.DependencyGraphBuilder
import nebula.test.dependencies.GradleDependencyGenerator
import nebula.test.dependencies.ModuleBuilder
import org.gradle.api.logging.LogLevel
import org.gradle.util.GradleVersion
import spock.lang.Unroll

class AlignRulesBasicWithCoreSpec extends IntegrationTestKitSpec {
class AlignRulesBasicWithCoreSpec extends AbstractIntegrationTestKitSpec {
private def rulesJsonFile

def setup() {
debug = true
keepFiles = true
if (GradleVersion.current().baseVersion < GradleVersion.version("6.0")) {
settingsFile << '''\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import spock.lang.Unroll
class AlignRulesForceSpec extends AbstractAlignRulesSpec {
def setup() {
keepFiles = true
debug = true
}

@Unroll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import spock.lang.Unroll
class AlignRulesForceStrictlyWithSubstitutionSpec extends AbstractAlignRulesSpec {
def setup() {
setupProjectAndDependencies()
debug = true
}

@Unroll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class AlignRulesMultiprojectSpec extends IntegrationSpec {
if (parallel) {
tasks += "--parallel"
}
def results = runTasksSuccessfully(*tasks)
def results = runTasks(*tasks)
then:
results.standardOutput.contains('\\--- project :a\n')
Expand Down Expand Up @@ -155,7 +155,7 @@ class AlignRulesMultiprojectSpec extends IntegrationSpec {
if (parallel) {
tasks += "--parallel"
}
runTasksSuccessfully(*tasks)
runTasks(*tasks)
then:
noExceptionThrown()
Expand Down Expand Up @@ -221,7 +221,7 @@ class AlignRulesMultiprojectSpec extends IntegrationSpec {
if (parallel) {
tasks += "--parallel"
}
def result = runTasksSuccessfully(*tasks)
def result = runTasks(*tasks)
then:
result.standardOutput.contains '+--- other.nebula:a:1.0.0 -> 1.1.0'
Expand Down Expand Up @@ -296,7 +296,7 @@ class AlignRulesMultiprojectSpec extends IntegrationSpec {
if (parallel) {
tasks += "--parallel"
}
def result = runTasksSuccessfully(*tasks)
def result = runTasks(*tasks)
then:
result.standardOutput.contains '+--- other.nebula:a:1.0.0 -> 1.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ import java.util.jar.JarEntry
import java.util.jar.JarOutputStream
import java.util.jar.Manifest

class AlignRulesPluginInteractionSpec extends IntegrationTestKitSpec {
class AlignRulesPluginInteractionSpec extends AbstractIntegrationTestKitSpec {
def setup() {
definePluginOutsideOfPluginBlock = true
debug = true
keepFiles = true
}

Expand Down Expand Up @@ -539,6 +538,7 @@ class AlignRulesPluginInteractionSpec extends IntegrationTestKitSpec {

@Unroll
def 'able to lock rules'() {
System.setProperty('ignoreDeprecations', 'true')
def graph = new DependencyGraphBuilder()
.addModule('test.nebula:a:1.41.5')
.addModule('test.nebula:a:1.42.2')
Expand Down Expand Up @@ -598,12 +598,12 @@ class AlignRulesPluginInteractionSpec extends IntegrationTestKitSpec {
buildscript {
repositories { mavenCentral() }
dependencies {
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:11.+'
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:14.+'
}
}
apply plugin: 'com.netflix.nebula.resolution-rules'
apply plugin: 'nebula.dependency-lock'
apply plugin: 'com.netflix.nebula.dependency-lock'
apply plugin: 'java'
repositories {
Expand Down Expand Up @@ -687,11 +687,11 @@ class AlignRulesPluginInteractionSpec extends IntegrationTestKitSpec {
buildscript {
repositories { mavenCentral() }
dependencies {
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:11.+'
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:14.+'
}
}
apply plugin: 'com.netflix.nebula.resolution-rules'
apply plugin: 'nebula.dependency-lock'
apply plugin: 'com.netflix.nebula.dependency-lock'
apply plugin: 'java'
repositories {
${mavenrepo.mavenRepositoryBlock}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ class AlignRulesTransitiveDependenciesSpec extends AbstractAlignRulesSpec {
@Unroll
def 'alignment of group 1 upgrades and introduces a new dependencies contributing to alignment of group 2'() {
given:
debug = true
def graph = new DependencyGraphBuilder()
.addModule(new ModuleBuilder("test.another:newlyIntroducedParentModule:1.0.0")
.addDependency("test.group2:module1:3.0.0").build())
Expand Down Expand Up @@ -442,7 +441,6 @@ class AlignRulesTransitiveDependenciesSpec extends AbstractAlignRulesSpec {
@Unroll
def 'alignment of group 1 upgrades and introduces a new dependencies contributing to alignment of group 2 and substitution still takes effect'() {
given:
debug = true
def graph = new DependencyGraphBuilder()
.addModule(new ModuleBuilder("test.another:newlyIntroducedParentModule:1.0.0")
.addDependency("test.group2:module1:3.0.0").build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import nebula.test.dependencies.ModuleBuilder
import spock.lang.Unroll

class AlignRulesVersionSuffixesSpec extends AbstractAlignRulesSpec {
def setup() {
debug = true
}

@Unroll
def 'requesting a specific version with no release version available'() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package nebula.plugin.resolutionrules

import nebula.test.IntegrationTestKitSpec

class IgnoredConfigurationsWithRulesSpec extends IntegrationTestKitSpec {
class IgnoredConfigurationsWithRulesSpec extends AbstractIntegrationTestKitSpec {
File rulesJsonFile

def setup() {
Expand Down Expand Up @@ -118,6 +117,7 @@ class IgnoredConfigurationsWithRulesSpec extends IntegrationTestKitSpec {
System.out.println("Hello World");
}
}""".stripIndent())
new File(projectDir, 'gradle.properties').text = '''org.gradle.configuration-cache=false'''.stripIndent()

when:
def result = runTasks( 'bootJar', 'assemble')
Expand Down
Loading

0 comments on commit 2792526

Please sign in to comment.