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

7.0.x simplify #274

Merged
merged 3 commits into from
Dec 20, 2024
Merged
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
4 changes: 3 additions & 1 deletion .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
java=17.0.12-librca
java=17.0.13-librca
gradle=8.11.1

12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,19 @@ ext {
grailsVersion = grailsVersionList[0]
}

subprojects {
subprojects { prj ->
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

String useMavenLocal = project.findProperty('mavenLocal')
repositories {
if (useMavenLocal || useMavenLocal != 'last') {
Copy link
Contributor

@matrei matrei Dec 20, 2024

Choose a reason for hiding this comment

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

Should this not be &&?

Copy link
Contributor

Choose a reason for hiding this comment

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

@codeconsole Coming back to this ☝️ :

  • If no mavenLocal property is set, (useMavenLocal = null), I think this will add mavenLocal() as the first repository, as useMavenLocal will evaluate to false but useMavenLocal != 'last' will evaluate to true.
  • If a mavenLocal property is set to any value, (-PmavenLocal=last), I think this will also add mavenLocal() as the first repository as useMavenLocal will evaluate to true.

println "Using mavenLocal() first on project `${prj.name}`"
mavenLocal()
}

maven { url "https://repo.grails.org/grails/core" }
mavenCentral()
if(groovyVersion.endsWith('-SNAPSHOT')) {
Expand All @@ -32,6 +38,10 @@ subprojects {
url = 'https://repository.apache.org/content/repositories/snapshots'
}
}
if (useMavenLocal == 'last') {
println "Using mavenLocal() last on project `${prj.name}`"
mavenLocal()
}
Comment on lines +41 to +44
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to set this before the Groovy Snapshot repo. Then it could be used for the Groovy Joint Workflow, if we want to do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

}

tasks.withType(Test) {
Expand Down
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.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading