I'm trying to implement the shared settings soluti...
# gradle
j
I'm trying to implement the shared settings solution provided by @eskatos on [StackOverflow](https://stackoverflow.com/a/47429918/1068649). I have my plugins project publishing a templated gradle script that provides the version for any of my plugins, as well as configuring our Nexus repo and Gradle plugin portal repo.
Copy code
val corporatePluginsIds = listOf("my-plugin-one", "my-plugin-two", "my-plugin-three")

pluginManagement {

    // means build scripts don't need to specify the version
    // (they just have to apply a version of this script from Nexus)
    resolutionStrategy {
        eachPlugin {
            if (requested.id.name in corporatePluginsIds) {
                useVersion("1.2.3")
            }
        }
    }

    repositories {
        mavenLocal()
        maven {
            name = "CorporateNexus"
            url = uri("<https://nexus.example.com.au/repository/maven-public>")
        }

        maven {
            name = "Gradle Plugin Portal"
            url = uri("<https://nexus.ops.console.com.au/repository/gradle-plugin-portal>")
        }

    }
}
I can just then
Copy code
apply { from("<https://path.to.script.gradle.kts>")}
in my settings.gradle.kts It works (yay!), but if I don't have a connection to our Nexus repo it fails - I was hoping caching would save me, but as far as I can tell it still does a HEAD on the URL to see if it's changed. Does this mean I need to be connected to our VPN every time I run gradle, or is there some way around this?