From cddf75f3e9844ef916ee2ce7e0afe362647d1c60 Mon Sep 17 00:00:00 2001 From: Vladimir Petko Date: Fri, 4 Oct 2024 18:30:14 +1300 Subject: [PATCH] chore: rename plugin --- README.md | 12 +++--- rockcraft-gradle/build.gradle.kts | 4 +- .../rockcraft/gradle/BaseRockcraftTest.java | 2 +- .../rockcraft/gradle/RockcraftPluginTest.java | 40 +++++++++---------- .../rockcraft/gradle/SpringBootTest.java | 16 ++++---- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 87ffc33..7385491 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,13 @@ To use the plugin, apply the following two steps: **Groovy** plugins { - id 'com.canonical.rockcraft' version '0.1.1' + id 'io.rockcrafters.rockcraft' version '0.1.1' } **Kotlin** plugins { - id("com.canonical.rockcraft") version "0.1.1" + id("io.rockcrafters.rockcraft") version "0.1.1" } ##### Alternatively, you can use the `buildscript` DSL: @@ -39,10 +39,10 @@ To use the plugin, apply the following two steps: } } dependencies { - classpath 'com.canonical.rockcraft:0..1' + classpath 'io.rockcrafters.rockcraft:0.1.1' } } - apply plugin: 'com.canonical.rockcraft-plugin' + apply plugin: 'io.rockcrafters.rockcraft-plugin' **Kotlin** @@ -53,10 +53,10 @@ To use the plugin, apply the following two steps: } } dependencies { - classpath("com.canonical.rockcraft:0.1.1") + classpath("io.rockcrafters.rockcraft:0.1.1") } } - apply(plugin = "com.canonical.rockcraft") + apply(plugin = "io.rockcrafters.rockcraft") ### 2. Configure ROCK container diff --git a/rockcraft-gradle/build.gradle.kts b/rockcraft-gradle/build.gradle.kts index 26ce1e5..d825076 100644 --- a/rockcraft-gradle/build.gradle.kts +++ b/rockcraft-gradle/build.gradle.kts @@ -3,7 +3,7 @@ plugins { id("com.gradle.plugin-publish") version "1.3.0" } -group = "com.canonical" +group = "io.rockcrafters" version = "0.1.1" repositories { @@ -29,7 +29,7 @@ gradlePlugin { plugins { create("rockcraftPlugin") { - id = "com.canonical.rockcraft" + id = "io.rockcrafters.rockcraft" displayName = "Rockcraft plugin" description = "Plugin for rock image generation" implementationClass = "com.canonical.rockcraft.gradle.RockcraftPlugin" diff --git a/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/BaseRockcraftTest.java b/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/BaseRockcraftTest.java index 7ac185b..76d94f1 100644 --- a/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/BaseRockcraftTest.java +++ b/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/BaseRockcraftTest.java @@ -69,7 +69,7 @@ public static void main(String[] args) { """ plugins { id('application') - id('com.canonical.rockcraft') + id('io.rockcrafters.rockcraft') } """); } diff --git a/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/RockcraftPluginTest.java b/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/RockcraftPluginTest.java index 4c0fc11..aaaa372 100644 --- a/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/RockcraftPluginTest.java +++ b/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/RockcraftPluginTest.java @@ -58,14 +58,14 @@ void buildRockJava11Test() throws IOException { writeString(getBuildFile(), """ plugins { id('java') - id('com.canonical.rockcraft') + id('io.rockcrafters.rockcraft') } - + rockcraft { buildPackage = "openjdk-11-jdk" targetRelease = 11 } - + """); var result = runBuild("build-rock"); assertTrue(true); // the build needs to succeed @@ -76,14 +76,14 @@ void rockcraftPluginOptions() throws IOException { writeString(getBuildFile(), """ plugins { id('java') - id('com.canonical.rockcraft') + id('io.rockcrafters.rockcraft') } - + rockcraft { summary = "Foobar" description = "readme.txt" } - + """); writeString(new File(getProjectDir(), "readme.txt"), """ This is a multiline description @@ -102,14 +102,14 @@ void testArchitecture() throws IOException { writeString(getBuildFile(), """ plugins { id('java') - id('com.canonical.rockcraft') + id('io.rockcrafters.rockcraft') } - + rockcraft { summary = "Foobar" architectures = [ "amd64", "arm64" ] } - + """); runBuild("jar", "create-rock"); @@ -127,14 +127,14 @@ void onlySingleRockExists() throws IOException { writeString(getBuildFile(), """ plugins { id('java') - id('com.canonical.rockcraft') + id('io.rockcrafters.rockcraft') } - + version = 0.01 - + rockcraft { } - + """); runBuild("build-rock"); File output = Path.of(getProjectDir().getAbsolutePath(), "build", "rock").toFile(); @@ -143,14 +143,14 @@ void onlySingleRockExists() throws IOException { writeString(getBuildFile(), """ plugins { id('java') - id('com.canonical.rockcraft') + id('io.rockcrafters.rockcraft') } - + version = '0.02updated' - + rockcraft { } - + """); runBuild("build-rock"); String[] rocks = output.list((dir, name) -> name.endsWith("rock")); @@ -164,11 +164,11 @@ void testAllOptions() throws IOException { writeString(getBuildFile(), """ plugins { id('java') - id('com.canonical.rockcraft') + id('io.rockcrafters.rockcraft') } - + version = 0.01 - + rockcraft { buildPackage = 'openjdk-17-jdk' targetRelease = 17 diff --git a/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/SpringBootTest.java b/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/SpringBootTest.java index 17dc989..35e6e68 100644 --- a/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/SpringBootTest.java +++ b/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/SpringBootTest.java @@ -32,17 +32,17 @@ public class SpringBootTest extends BaseRockcraftTest { protected void setUp() throws IOException { String app = """ package com.example.app2; - + import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; - + @SpringBootApplication public class DemoApplication { - + public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } - + } """; Path javaDir = Path.of(projectDir.getAbsolutePath(), "src", "main", "java", "com", "example", "app2"); @@ -53,16 +53,16 @@ public static void main(String[] args) { id 'java' id 'org.springframework.boot' version '3.3.2' id 'io.spring.dependency-management' version '1.1.6' - id 'com.canonical.rockcraft' + id 'io.rockcrafters.rockcraft' } - + group = 'com.example' version = '0.0.1-SNAPSHOT' - + repositories { mavenCentral() } - + dependencies { implementation 'org.springframework.boot:spring-boot-starter' testImplementation 'org.springframework.boot:spring-boot-starter-test'