How can I force a gradle build to re-download a SNAPSHOT plugin from Maven repository on every build

Jörn Guy Süß

As shown below, I have a gradle plugin that is built deployed as a SNAPSHOT version in a maven repository.

I am aware that -SNAPSHOT dependencies should automatically be recognised as changing=true

I also know that the resolutionStrategy should allow forcing a new download for all configurations.

However, in this context, the setting has no effect.

Question: Can you provide a corrected sample, based on the one below, that forces a re-download on every run, or explain how such a configuration can be achieved?

buildscript {
    repositories { maven { url "http://moomoomoo.com:8081/artifactory/moomoomoo-plugins" } }
    dependencies { classpath 'com.moomoomoo:moomootools:1.3-SNAPSHOT' }
}

configurations.all { resolutionStrategy.cacheChangingModulesFor 0, 'seconds' }

apply plugin: 'com.moomoomoo.moomootool'
Wilco Greven

To configure the resolution strategy of the classpath configuration for the build script you have to configure it inside the buildscript block:

buildscript {
    repositories { maven { url "http://moomoomoo.com:8081/artifactory/moomoomoo-plugins" } }
    configurations.all { resolutionStrategy.cacheChangingModulesFor 0, 'seconds' }
    dependencies { classpath 'com.moomoomoo:moomootools:1.3-SNAPSHOT' }
}

apply plugin: 'com.moomoomoo.moomootool'

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I build a Gradle plugin with Maven

How can i do a gradle publish on teamcity to publish a gradle build that uses the maven plugin?

How to download SNAPSHOT version from maven SNAPSHOT repository?

Execute Maven Plugin in every Build

Gradle build failing to get dependency from custom maven repository

How can I force update all the snapshot Gradle dependencies in intellij

How do I replace a Maven repository with a local directory after it is defined in a Gradle build?

How can I download the build file from github actions?

How to checkout and build maven project from gradle?

How can plugin programmatically configure maven-publish publishing and allow build.gradle to modify it

From where can I download build symbols generated by VSTS Build?

add maven repository to build.gradle

Gradle Offline Build Using Maven Repository

How to manually download file from Maven repository in Gradle

gradle build consistently fails at download of random plugin

Force Gradle build to fail when releasing with SNAPSHOT dependencies

How to move a gradle function from build.gradle into a plugin?

How can I build WAR with Maven in Eclipse?

Can I know, in a maven plugin, if a build of a module failed?

How can I configure Gradle google-java-format plugin to run goJF in the build step?

In a Maven multi-module project, how can I run a full build and run a specific plugin on one child?

With Gradle 2.12 (for Java), how can download source files if and only if 'build'?

How to convert a Maven build to Gradle?

How to stop Maven from installing project build JAR to local repository

maven assembly how to add a zip flie from nexus repository to the build

How can I add docstrings to android maven-publish .aar files in build.gradle.kts?

How to build maven project both Snapshot and Release build simultaneously

How can I download a specific Maven artifact from repository to local drive?

How can I force the client to re-download my website?