Skip to content

Commit

Permalink
feat: rename dev.hilla to com.vaadin.hilla (#18337)
Browse files Browse the repository at this point in the history
* Rename dev.hilla to com.vaadin.hilla

* formatting
  • Loading branch information
cromoteca committed Dec 22, 2023
1 parent 419ab85 commit c827658
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void setup() throws Exception {

defaultJavaSource = new File(".", "src/test/java");
openApiJsonFile = new File(npmFolder,
"target/classes/dev/hilla/openapi.json");
"target/classes/com/vaadin/hilla/openapi.json");
generatedTsFolder = new File(npmFolder, "frontend/generated");

Assert.assertTrue("Failed to create a test project resources",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public TestTaskGenerateOpenAPI(Options options) {
@Override
public void execute() {
writeFile(new File(options.getBuildDirectory(),
"classes/dev/hilla/openapi.json"), "{}");
"classes/com/vaadin/hilla/openapi.json"), "{}");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void should_notUseHilla_inPrepareFrontend()
setupPluginAdapterDefaults();

File openApiJsonFile = new File(new File(baseDir, Constants.TARGET),
"classes/dev/hilla/openapi.json");
"classes/com/vaadin/hilla/openapi.json");
Mockito.when(adapter.openApiJsonFile()).thenReturn(openApiJsonFile);

BuildFrontendUtil.prepareFrontend(adapter);
Expand Down Expand Up @@ -225,7 +225,7 @@ private void setupPluginAdapterDefaults() throws URISyntaxException {
.thenReturn(javaResourceFolder);
Mockito.when(adapter.openApiJsonFile())
.thenReturn(new File(new File(baseDir, Constants.TARGET),
"classes/dev/hilla/openapi.json"));
"classes/com/vaadin/hilla/openapi.json"));
Mockito.when(adapter.getClassFinder())
.thenReturn(new ClassFinder.DefaultClassFinder(
this.getClass().getClassLoader()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static void stubPluginAdapterBase(PluginAdapterBase adapter,
.thenReturn(new File(baseDir, "src/main/resources"));
Mockito.when(adapter.openApiJsonFile())
.thenReturn(new File(new File(baseDir, Constants.TARGET),
"classes/dev/hilla/openapi.json"));
"classes/com/vaadin/hilla/openapi.json"));
Mockito.when(adapter.getClassFinder())
.thenReturn(new ClassFinder.DefaultClassFinder(
TestUtil.class.getClassLoader()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public interface EndpointRequestUtil extends Serializable {
*/
static boolean isHillaAvailable() {
try {
Class.forName("dev.hilla.EndpointController");
Class.forName("com.vaadin.hilla.EndpointController");
return true;
} catch (ClassNotFoundException e) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ public static Optional<String> getHillaVersion() {
if (hillaVersion == null) {
try (final InputStream hillaPomProperties = Thread.currentThread()
.getContextClassLoader().getResourceAsStream(
"META-INF/maven/dev.hilla/hilla/pom.properties")) {
"META-INF/maven/com.vaadin.hilla/hilla/pom.properties")) {
if (hillaPomProperties != null) {
final Properties properties = new Properties();
properties.load(hillaPomProperties);
hillaVersion = properties.getProperty("version", "");
} else {
LOGGER.info("Unable to determine Hilla version. "
+ "No META-INF/maven/dev.hilla/hilla/pom.properties found");
+ "No META-INF/maven/com.vaadin.hilla/hilla/pom.properties found");
hillaVersion = "";
}
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ private void fakeVaadinHilla(String vaadinVersion, String hillaVersion)

if (hillaVersion != null) {
final Path hillaJar = temporary.newFolder().toPath();
final Path pomProperties = hillaJar
.resolve("META-INF/maven/dev.hilla/hilla/pom.properties");
final Path pomProperties = hillaJar.resolve(
"META-INF/maven/com.vaadin.hilla/hilla/pom.properties");
Files.createDirectories(pomProperties.getParent());
Files.writeString(pomProperties, "version=" + hillaVersion);
classPath.add(hillaJar.toUri().toURL());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void setup() throws Exception {
@Test
public void should_generateOpenApi() throws Exception {
File generatedOpenApiJson = Paths
.get(baseDir, TARGET, "classes/dev/hilla/openapi.json")
.get(baseDir, TARGET, "classes/com/vaadin/hilla/openapi.json")
.toFile();

Assert.assertFalse(generatedOpenApiJson.exists());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public TestTaskGenerateOpenAPI(Options options) {
@Override
public void execute() {
writeFile(new File(options.getBuildDirectory(),
"classes/dev/hilla/openapi.json"), "{}");
"classes/com/vaadin/hilla/openapi.json"), "{}");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public void should_generateOpenApi_when_EndpointPresents()
throws Exception {
String originalJavaSourceFolder = null;
File generatedOpenApiJson = Paths
.get(baseDir, TARGET, "classes/dev/hilla/openapi.json")
.get(baseDir, TARGET, "classes/com/vaadin/hilla/openapi.json")
.toFile();
try {
originalJavaSourceFolder = System
Expand Down Expand Up @@ -374,7 +374,7 @@ public void should_notGenerateOpenApi_when_EndpointIsNotUsed()
throws Exception {
String originalJavaSourceFolder = null;
File generatedOpenApiJson = Paths
.get(baseDir, TARGET, "classes/dev/hilla/openapi.json")
.get(baseDir, TARGET, "classes/com/vaadin/hilla/openapi.json")
.toFile();
try {
originalJavaSourceFolder = System
Expand Down
2 changes: 1 addition & 1 deletion vaadin-dev-server/src/test/resources/java/MyEndpoint.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dev.hilla.Endpoint;
import com.vaadin.hilla.Endpoint;

/**
* A test class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public class VaadinServletContextInitializer
Theme.class.getPackage().getName(),
// LitRenderer uses script annotation
"com.vaadin.flow.data.renderer", "com.vaadin.shrinkwrap",
"dev.hilla")
"com.vaadin.hilla")
.collect(Collectors.toList());

/**
Expand Down Expand Up @@ -882,7 +882,7 @@ List<String> getDefaultPackages() {
private List<String> getLookupPackages() {
return Stream
.concat(getDefaultPackages().stream(),
Stream.of("dev.hilla.frontend",
Stream.of("com.vaadin.hilla.frontend",
"com.vaadin.flow.component.polymertemplate.rpc",
"com.vaadin.base.devserver"))
.collect(Collectors.toList());
Expand Down

0 comments on commit c827658

Please sign in to comment.