Skip to content

Releases: SgtSilvio/gradle-oci

0.9.0

28 Mar 21:11
Compare
Choose a tag to compare

🌟 Features

  • Added ociImageDependencies extension
    • Can be used to declare dependencies for test tasks:
      ociImageDependencies.forTest(tasks.test) {
          runtime(...)
      }
      
      Replaces the old syntax:
      oci {
          imageDependencies.forTest(tasks.test) {
              add(...)
          }
      }
      
    • Can be used to declare dependencies for test suites:
      testing {
          suites {
              "test"(JvmTestSuite::class) {
                  ociImageDependencies {
                      runtime(...)
                  }
              }
          }
      }
      

ℹ️ Miscellaneous

  • Updated dependencies

0.8.0

16 Mar 15:27
Compare
Choose a tag to compare

🌟 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 a latest tag (previously this was only possible by declaring the dependency twice, once without any call to tag and secondly with .tag("latest"))
  • Added command line options registry, url, credentials for tasks of type OciPushTask:
    • --registry: Pushes to the registry defined with the specified name in oci.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 type OciPushSingleTask for every image definition (task name is pushOciImage for the main 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

20 Jan 17:19
Compare
Choose a tag to compare

✨ Improvements

  • OciRegistryDataTask only stores necessary layers (previously unnecessary layers could be stored when a parent image has more architectures then the final image)

ℹ️ Miscellaneous

  • Updated dependencies

0.6.0

03 Jan 13:10
Compare
Choose a tag to compare

🌟 Features

  • Set classifier of artifacts (OciComponent and OciLayer) when publishing OCI image variants
  • Added classifier property to OciLayer and OciComponentTask
  • Added destinationDirectory property to OciComponentTask
  • Renamed outputDirectory property to destinationDirectory in OciLayerTask

✨ 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 to tgz
  • Improve camel and kebab casing of names

0.5.0

20 Dec 19:56
Compare
Choose a tag to compare

✨ Improvements

  • Improve repository proxies for OCI registries

0.4.0

18 Dec 17:41
Compare
Choose a tag to compare

🌟 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 mapped url
  • 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

✨ Improvements

  • Removed usage of afterEvaluate
  • Support - in digests (theoretically allowed to be used, although not currently)

ℹ️ Miscellaneous

  • Updated dependencies

0.3.0

14 Dec 11:58
Compare
Choose a tag to compare

✨ 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
    • 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") }
  • Added OciPushTask.Registry
    • Moved OciPushTask.registryUrl to OciPushTask.registry.url
    • Moved OciPushTask.credentials to OciPushTask.registry.credentials
    • Added OciPushTask.registry { }
    • Added OciPushTask.registry.from(OciRegistry)

ℹ️ Miscellaneous

  • Updated dependencies

0.2.0

12 Nov 19:35
Compare
Choose a tag to compare

✨ Improvements

  • Updated netty to incorporate the fix "Prevent classloader leak via JNI"
  • Split OciImageDefinition.imageReference into imageName and imageTag
  • Compatibility with Gradle 8.4 (adapt to change of ProjectDependencyPublicationResolver.resolve internal api)

ℹ️ Miscellaneous

  • Updated dependencies
  • Rename build output directory oci/registry to oci/registries

0.1.0

11 Sep 10:22
Compare
Choose a tag to compare
v0.1.0

Add signing plugin