Slackbot
05/02/2023, 2:05 PMVampire
05/02/2023, 2:07 PMVampire
05/02/2023, 2:07 PMVampire
05/02/2023, 2:07 PMYair Taboch
05/02/2023, 2:11 PMmy-awesome-plugin
is in a private repo that i need vpn to login to.
and this plugin does not affect the build in any way, but gives extra tasks that my org needs in the ci/cd.
and i don’t need it/can’t get to the private repo while development .
i know it’s a very bad practice. but its still something i was wondering aboutAdam
05/02/2023, 2:14 PMYair Taboch
05/02/2023, 2:17 PMAdam
05/02/2023, 2:21 PMmy-awesome-plugin
source code? You could check it out and set up a composite build (add it as an includedBuild()
), then Gradle should substitute it
or maybe write some complicated custom resolution rule that would replace the my-awsome-plugin
plugin marker artifact with the Gradle Base Plugin marker artifactYair Taboch
05/02/2023, 2:23 PMYair Taboch
05/02/2023, 2:49 PMmavenLocal {
uri("/tmp/derp/location")
}
Yair Taboch
05/02/2023, 2:50 PMAdam
05/02/2023, 2:50 PM$USER_HOME/.m2
. You can change it, but not via Gradle configuration.Yair Taboch
05/02/2023, 2:50 PMAdam
05/02/2023, 2:52 PMYair Taboch
05/02/2023, 2:52 PMAdam
05/02/2023, 2:53 PMmaven {}
definitionAdam
05/02/2023, 2:54 PMrepositories {
maven {
url = file("/path/to/repo")
}
}
but if you’re using Kotlin DSL, I’d define it like this, and then it’s usually a good idea to add a name
repositories {
maven(file("/path/to/repo")) {
name = "MyLocalRepo"
}
}
Vampire
05/02/2023, 2:56 PMand this plugin does not affect the build in any way, but gives extra tasks that my org needs in the ci/cd.Then you could just do what I said roughly. Use the legacy applying by adding to build script classpath and calling
apply
and make both actions in an if
that checks somehow whether that repository is available or not. But make sure you don't have to wait for some "long" connection timeout when not in VPN.Vampire
05/02/2023, 2:57 PMVampire
05/02/2023, 2:57 PMVampire
05/02/2023, 2:58 PMVampire
05/02/2023, 2:58 PM