We have a strict inventory policy here. I need to specify which repository certain things come from. something like this
repositories {
legal_approved {
maven {
url 'https://myartifactory.com/approved'
}
}
transitive {
maven {
url 'https://myartifactory.com/transitive'
}
}
}
dependencies {
compile 'com.awesome:awesome-library:+'
}
so the way i need this to work is kinda odd, but not for us.
- Since ‘awesome-library’ is directly requested, it must be approved for use by our technology council. If our council approves the library, it will be installed into our artifactory under approved. any transitive dependencies for ‘awesome-library’ (lets name one tran-B) are installed in the transitive repo of our artifactory. So, under the rules, the above would be just fine.
- If a dev put a new line in the dependencies for tran-B, then that tran-b will have to come out of approved. If tran-b exists in myartifactory.com/transitive but not myartifactory.com/approved, the build must fail because the library did not go thru our legal and security review process.
simply put, anything in the dependencies block must come out of the artifactory repo “approved”, anything else comes out of “transitive”
How do i pull this one off?