Releases: SgtSilvio/gradle-oci
Releases · SgtSilvio/gradle-oci
0.9.0
🌟 Features
- Added
ociImageDependencies
extension- Can be used to declare dependencies for test tasks:
Replaces the old syntax:
ociImageDependencies.forTest(tasks.test) { runtime(...) }
oci { imageDependencies.forTest(tasks.test) { add(...) } }
- Can be used to declare dependencies for test suites:
testing { suites { "test"(JvmTestSuite::class) { ociImageDependencies { runtime(...) } } } }
- Can be used to declare dependencies for test tasks:
ℹ️ Miscellaneous
- Updated dependencies
0.8.0
🌟 Features
- Added support for multiple tags on an OCI image dependency
- Existing APIs for a single tag:
.tag("tag1")
.tag(provider { "tag1" })
- Additional APIs for multiple tags:
.tag("tag1", "tag2")
.tag(setOf("tag1", "tag2"))
.tag(provider { setOf("tag1", "tag2") })
- All above APIs can be called in a chain multiple times, for example
.tag("tag1").tag("tag2", "tag3")
"."
is a placeholder for the default tag of the dependency, for example.tag(".", "latest")
keeps the tag and additionally adds alatest
tag (previously this was only possible by declaring the dependency twice, once without any call totag
and secondly with.tag("latest")
)
- Existing APIs for a single tag:
- Added command line options registry, url, credentials for tasks of type
OciPushTask
:--registry
: Pushes to the registry defined with the specified name inoci.registries
.--url
: Pushes to the specified registry URL.--credentials
: Authenticates to the registry using the credentials with the specified id.
- Added
push{imageDefinitionName}OciImage
tasks of typeOciPushSingleTask
for every image definition (task name ispushOciImage
for themain
image definition) with command line options:--name
: Names the image. If not specified, the imageName defined in the image definition is used.--tag
: Tags the image. Option can be specified multiple times. The value.
translates to the imageTag defined in the image definition. If not specified, the imageTag defined in the image definition is used.
- Added
OciRegistry.optionalCredentials()
✨ Improvements
- Improved syntax for adding constraints to
OciImagesDependencies
(similar to Gradle's strongly-typed dependencies block)constraint(DependencyConstraint)
→
add(DependencyConstraint)
constraint(CharSequence)
→
add(constraint(CharSequence))
constraint(Project)
→
add(constraint(Project))
constraint(Provider<MinimalExternalModuleDependency>)
→
add(constraint(Provider<MinimalExternalModuleDependency>))
constraint(ProviderConvertible<MinimalExternalModuleDependency>)
→
add(constraint(ProviderConvertible<MinimalExternalModuleDependency>))
- New APIs:
add(DependencyConstraint)
add(DependencyConstraint, Action<in DependencyConstraint>)
add(Provider<out DependencyConstraint>)
add(Provider<out DependencyConstraint>, Action<in DependencyConstraint>)
- Factories for dependency constraints:
constraint(CharSequence)
constraint(Project)
constraint(Provider<out MinimalExternalModuleDependency>)
constraint(ProviderConvertible<out MinimalExternalModuleDependency>)
🐞 Bug fixes
- Fix possible layer corruption during download because of invalid retries after partial data has already been received
- Fix compatibility with Configuration Cache (
java.time.Instant
could not be serialized)
ℹ️ Miscellaneous
- Updated dependencies
0.7.0
0.6.0
🌟 Features
- Set classifier of artifacts (
OciComponent
andOciLayer
) when publishing OCI image variants - Added
classifier
property toOciLayer
andOciComponentTask
- Added
destinationDirectory
property toOciComponentTask
- Renamed
outputDirectory
property todestinationDirectory
inOciLayerTask
✨ Improvements
- Improved repository proxies for OCI registries
- Better component and layer file names and urls
- Use Ivy instead of Maven repository as proxy
- Rename layer extension from
tar.gz
totgz
- Improve camel and kebab casing of names
0.5.0
0.4.0
🌟 Features
- Added
OciRegistry.credentials()
that automatically uses the registry name as the credentials identity - Allow mapping of
OciRegistry.url
by default- Via a Gradle property with the url as key
- Example:
https\://registry-1.docker.io=<my-docker-hub-mirror>
in~/.gradle.properties
- Added
OciRegistry.finalUrl
that exposes the mappedurl
- Allow to specify digests as a version
- Example:
add("library:eclipse-temurin:sha256!56be7e97bc4d2fffafdda7e8198741fd96513bc12f05d6da9f18c2577a1d5649")
- If the version is a digest, it will be automatically verified
- Example:
✨ Improvements
- Removed usage of
afterEvaluate
- Support
-
in digests (theoretically allowed to be used, although not currently)
ℹ️ Miscellaneous
- Updated dependencies
0.3.0
✨ Improvements
- Compatibility with Gradle 8.5
- Refactored
oci.imageDependencies
- Refactored image dependency tagging
- Before vs now:
add("library:eclipse-temurin:20.0.1_9-jre-jammy", tag("library/eclipse-temurin:20"))
add("library:eclipse-temurin:20.0.1_9-jre-jammy").tag("20")
- Before vs now:
add("library:eclipse-temurin:20.0.1_9-jre-jammy", tag("eclipse-temurin:20"))
add("library:eclipse-temurin:20.0.1_9-jre-jammy").name("eclipse-temurin").tag("20")
- No internal API or additional tasks (
OciTagComponentTask
) required
- Before vs now:
- Removed
OciImageDependenciesContainer
- Before vs now:
oci.imageDependencies.register("images") { default("library:eclipse-temurin:20.0.1_9-jre-jammy") }
oci.imageDependencies.register("images") { add("library:eclipse-temurin:20.0.1_9-jre-jammy") }
- Before vs now:
oci.imageDependencies.register("images") { scope("v2")("library:eclipse-temurin:20.0.1_9-jre-jammy") }
oci.imageDependencies.register("imagesV2") { add("library:eclipse-temurin:20.0.1_9-jre-jammy") }
- Before vs now:
oci.imageDependencies.forTest(tasks.test) { default("library:eclipse-temurin:20.0.1_9-jre-jammy") }
oci.imageDependencies.forTest(tasks.test) { add("library:eclipse-temurin:20.0.1_9-jre-jammy") }
- Before vs now:
oci.imageDependencies.forTest(tasks.test) { scope("v2")("library:eclipse-temurin:20.0.1_9-jre-jammy") }
oci.imageDependencies.forTest(tasks.test, "v2") { add("library:eclipse-temurin:20.0.1_9-jre-jammy") }
- Before vs now:
- Refactored image dependency tagging
- Added
OciPushTask.Registry
- Moved
OciPushTask.registryUrl
toOciPushTask.registry.url
- Moved
OciPushTask.credentials
toOciPushTask.registry.credentials
- Added
OciPushTask.registry { }
- Added
OciPushTask.registry.from(OciRegistry)
- Moved
ℹ️ Miscellaneous
- Updated dependencies
0.2.0
✨ Improvements
- Updated netty to incorporate the fix "Prevent classloader leak via JNI"
- Split
OciImageDefinition.imageReference
intoimageName
andimageTag
- Compatibility with Gradle 8.4 (adapt to change of
ProjectDependencyPublicationResolver.resolve
internal api)
ℹ️ Miscellaneous
- Updated dependencies
- Rename build output directory
oci/registry
tooci/registries