diff --git a/build.gradle b/build.gradle index 64d4f98..b961f62 100644 --- a/build.gradle +++ b/build.gradle @@ -22,8 +22,8 @@ repositories { } } -sourceCompatibility = 17 -targetCompatibility = 17 +sourceCompatibility = 21 +targetCompatibility = 21 group "io.kestra.storage" description = 'Google Cloud Storage storage plugin for Kestra' @@ -57,6 +57,7 @@ dependencies { // kestra compileOnly group: "io.kestra", name: "core", version: kestraVersion + annotationProcessor group: "io.kestra", name: "processor", version: kestraVersion // libs api platform('com.google.cloud:libraries-bom:26.37.0') @@ -99,6 +100,7 @@ dependencies { testImplementation group: "io.kestra", name: "core", version: kestraVersion testImplementation group: "io.kestra", name: "core", version: kestraVersion, classifier: 'tests' + testAnnotationProcessor group: "io.kestra", name: "processor", version: kestraVersion } /**********************************************************************************************************************\ diff --git a/gradle.properties b/gradle.properties index 7a14be6..ce7f3f5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ version=0.17.0-SNAPSHOT -kestraVersion=[0.16,) +kestraVersion=[0.17,) micronautVersion=4.3.7 lombokVersion=1.18.32 diff --git a/src/main/java/io/kestra/storage/gcs/GcsStorage.java b/src/main/java/io/kestra/storage/gcs/GcsStorage.java index 5113582..6a6f2eb 100644 --- a/src/main/java/io/kestra/storage/gcs/GcsStorage.java +++ b/src/main/java/io/kestra/storage/gcs/GcsStorage.java @@ -3,6 +3,7 @@ import com.google.api.gax.paging.Page; import com.google.cloud.WriteChannel; import com.google.cloud.storage.*; +import io.kestra.core.models.annotations.Plugin; import io.kestra.core.storages.FileAttributes; import io.micronaut.core.annotation.Introspected; import io.kestra.core.storages.StorageInterface; @@ -22,12 +23,15 @@ import jakarta.inject.Inject; import jakarta.inject.Singleton; +import lombok.NoArgsConstructor; import static io.kestra.core.utils.Rethrow.throwFunction; @Singleton @GcsStorageEnabled @Introspected +@Plugin +@NoArgsConstructor public class GcsStorage implements StorageInterface { @Inject Storage storage; @@ -35,7 +39,6 @@ public class GcsStorage implements StorageInterface { @Inject GcsConfig config; - private BlobId blob(String tenantId, URI uri) { String path = getPath(tenantId, uri); return blob(path);