From 344e29439fb7383ed5693ca6882ee5f430e8effd Mon Sep 17 00:00:00 2001 From: Jonathan Schneider Date: Sat, 14 Dec 2024 18:58:08 -0500 Subject: [PATCH 1/3] Apply MSAL license --- bin/main/META-INF/rewrite/category.yml | 41 ++++++++++++++++++++ bin/main/META-INF/rewrite/launchdarkly-6.yml | 28 +++++++++++++ bin/main/META-INF/rewrite/launchdarkly-7.yml | 28 +++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 bin/main/META-INF/rewrite/category.yml create mode 100644 bin/main/META-INF/rewrite/launchdarkly-6.yml create mode 100644 bin/main/META-INF/rewrite/launchdarkly-7.yml diff --git a/bin/main/META-INF/rewrite/category.yml b/bin/main/META-INF/rewrite/category.yml new file mode 100644 index 0000000..82d2dd0 --- /dev/null +++ b/bin/main/META-INF/rewrite/category.yml @@ -0,0 +1,41 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +type: specs.openrewrite.org/v1beta/category +name: Feature flags +packageName: org.openrewrite.featureflags +description: Recipes to perform feature flag migration tasks. +--- +type: specs.openrewrite.org/v1beta/category +name: LaunchDarkly +packageName: org.openrewrite.featureflags.launchdarkly +description: Recipes to perform [LaunchDarkly](https://launchdarkly.com/) migration tasks. +--- +type: specs.openrewrite.org/v1beta/category +name: FF4j +packageName: org.openrewrite.featureflags.ff4j +description: Recipes to perform [FF4j](https://ff4j.org/) migration tasks. +--- +type: specs.openrewrite.org/v1beta/category +name: OpenFeature +packageName: org.openrewrite.featureflags.openfeature +description: Recipes to perform [OpenFeature](https://openfeature.dev/) migration tasks. +--- +type: specs.openrewrite.org/v1beta/category +name: Unleash +packageName: org.openrewrite.featureflags.unleash +description: Recipes to perform [Unleash](https://getunleash.io/) migration tasks. diff --git a/bin/main/META-INF/rewrite/launchdarkly-6.yml b/bin/main/META-INF/rewrite/launchdarkly-6.yml new file mode 100644 index 0000000..fae8720 --- /dev/null +++ b/bin/main/META-INF/rewrite/launchdarkly-6.yml @@ -0,0 +1,28 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.featureflags.launchdarkly.UpgradeLaunchDarkly6 +displayName: Migrate to LaunchDarkly 6.x +description: This recipe will apply changes commonly needed when migrating to LaunchDarkly 6.x. +recipeList: + # https://docs.launchdarkly.com/sdk/server-side/java/migration-5-to-6 + - org.openrewrite.java.dependencies.UpgradeDependencyVersion: + groupId: com.launchdarkly + artifactId: launchdarkly-java-server-sdk + newVersion: 6.x + - org.openrewrite.featureflags.launchdarkly.MigrateUserToContext diff --git a/bin/main/META-INF/rewrite/launchdarkly-7.yml b/bin/main/META-INF/rewrite/launchdarkly-7.yml new file mode 100644 index 0000000..3429bca --- /dev/null +++ b/bin/main/META-INF/rewrite/launchdarkly-7.yml @@ -0,0 +1,28 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.featureflags.launchdarkly.UpgradeLaunchDarkly7 +displayName: Migrate to LaunchDarkly 7.x +description: This recipe will apply changes commonly needed when migrating to LaunchDarkly 7.x. +recipeList: + - org.openrewrite.featureflags.launchdarkly.UpgradeLaunchDarkly6 + # https://docs.launchdarkly.com/sdk/server-side/java/migration-6-to-7 + - org.openrewrite.java.dependencies.UpgradeDependencyVersion: + groupId: com.launchdarkly + artifactId: launchdarkly-java-server-sdk + newVersion: 7.x From 282ff24fad3dee80c8dabfde1200ac2cc6c2fc73 Mon Sep 17 00:00:00 2001 From: Jonathan Schneider Date: Sat, 14 Dec 2024 19:10:57 -0500 Subject: [PATCH 2/3] Apply MSAL license --- bin/main/META-INF/rewrite/category.yml | 41 -------------------- bin/main/META-INF/rewrite/launchdarkly-6.yml | 28 ------------- bin/main/META-INF/rewrite/launchdarkly-7.yml | 28 ------------- 3 files changed, 97 deletions(-) delete mode 100644 bin/main/META-INF/rewrite/category.yml delete mode 100644 bin/main/META-INF/rewrite/launchdarkly-6.yml delete mode 100644 bin/main/META-INF/rewrite/launchdarkly-7.yml diff --git a/bin/main/META-INF/rewrite/category.yml b/bin/main/META-INF/rewrite/category.yml deleted file mode 100644 index 82d2dd0..0000000 --- a/bin/main/META-INF/rewrite/category.yml +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright 2024 the original author or authors. -#

-# Licensed under the Moderne Source Available License (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -#

-# https://docs.moderne.io/licensing/moderne-source-available-license -#

-# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -type: specs.openrewrite.org/v1beta/category -name: Feature flags -packageName: org.openrewrite.featureflags -description: Recipes to perform feature flag migration tasks. ---- -type: specs.openrewrite.org/v1beta/category -name: LaunchDarkly -packageName: org.openrewrite.featureflags.launchdarkly -description: Recipes to perform [LaunchDarkly](https://launchdarkly.com/) migration tasks. ---- -type: specs.openrewrite.org/v1beta/category -name: FF4j -packageName: org.openrewrite.featureflags.ff4j -description: Recipes to perform [FF4j](https://ff4j.org/) migration tasks. ---- -type: specs.openrewrite.org/v1beta/category -name: OpenFeature -packageName: org.openrewrite.featureflags.openfeature -description: Recipes to perform [OpenFeature](https://openfeature.dev/) migration tasks. ---- -type: specs.openrewrite.org/v1beta/category -name: Unleash -packageName: org.openrewrite.featureflags.unleash -description: Recipes to perform [Unleash](https://getunleash.io/) migration tasks. diff --git a/bin/main/META-INF/rewrite/launchdarkly-6.yml b/bin/main/META-INF/rewrite/launchdarkly-6.yml deleted file mode 100644 index fae8720..0000000 --- a/bin/main/META-INF/rewrite/launchdarkly-6.yml +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2024 the original author or authors. -#

-# Licensed under the Moderne Source Available License (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -#

-# https://docs.moderne.io/licensing/moderne-source-available-license -#

-# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.featureflags.launchdarkly.UpgradeLaunchDarkly6 -displayName: Migrate to LaunchDarkly 6.x -description: This recipe will apply changes commonly needed when migrating to LaunchDarkly 6.x. -recipeList: - # https://docs.launchdarkly.com/sdk/server-side/java/migration-5-to-6 - - org.openrewrite.java.dependencies.UpgradeDependencyVersion: - groupId: com.launchdarkly - artifactId: launchdarkly-java-server-sdk - newVersion: 6.x - - org.openrewrite.featureflags.launchdarkly.MigrateUserToContext diff --git a/bin/main/META-INF/rewrite/launchdarkly-7.yml b/bin/main/META-INF/rewrite/launchdarkly-7.yml deleted file mode 100644 index 3429bca..0000000 --- a/bin/main/META-INF/rewrite/launchdarkly-7.yml +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2024 the original author or authors. -#

-# Licensed under the Moderne Source Available License (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -#

-# https://docs.moderne.io/licensing/moderne-source-available-license -#

-# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.featureflags.launchdarkly.UpgradeLaunchDarkly7 -displayName: Migrate to LaunchDarkly 7.x -description: This recipe will apply changes commonly needed when migrating to LaunchDarkly 7.x. -recipeList: - - org.openrewrite.featureflags.launchdarkly.UpgradeLaunchDarkly6 - # https://docs.launchdarkly.com/sdk/server-side/java/migration-6-to-7 - - org.openrewrite.java.dependencies.UpgradeDependencyVersion: - groupId: com.launchdarkly - artifactId: launchdarkly-java-server-sdk - newVersion: 7.x From e11fdab6e8402a346db5b04e5ea4129335525e42 Mon Sep 17 00:00:00 2001 From: Jonathan Schneider Date: Sat, 14 Dec 2024 21:16:37 -0500 Subject: [PATCH 3/3] MSAL license gets set in pom.xml --- build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index c1c4ca7..0c83436 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,6 @@ plugins { id("org.openrewrite.build.recipe-library") version "latest.release" + id("org.openrewrite.build.moderne-source-available-license") version "latest.release" } group = "org.openrewrite.recipe" @@ -32,4 +33,4 @@ recipeDependencies { parserClasspath("com.launchdarkly:launchdarkly-java-server-sdk:5.10.+") parserClasspath("com.launchdarkly:launchdarkly-java-server-sdk:6.+") //parserClasspath("com.launchdarkly:launchdarkly-java-server-sdk:7.+") -} \ No newline at end of file +}