Skip to content

Commit

Permalink
fixes for native build
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollovati committed Nov 17, 2024
1 parent 90b2377 commit 1b0b688
Showing 1 changed file with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,6 @@ void hillaNativeSupport(
.includePatterns("META-INF/microprofile-config\\.properties")
.build());

// explicitly register classes not present in the index
reflectiveClass.produce(ReflectiveClassBuildItem.builder(
com.github.mcollovati.quarkus.hilla.crud.panache.CrudRepositoryService.class,
com.github.mcollovati.quarkus.hilla.crud.panache.ListRepositoryService.class,
com.github.mcollovati.quarkus.hilla.crud.spring.CrudRepositoryService.class,
com.github.mcollovati.quarkus.hilla.crud.spring.ListRepositoryService.class)
.constructors()
.methods()
.build());

IndexView index = combinedIndex.getComputingIndex();
Set<ClassInfo> classes = new HashSet<>();
classes.addAll(index.getAllKnownImplementors(EndpointTransferMapper.Mapper.class));
Expand All @@ -254,6 +244,23 @@ void hillaNativeSupport(
classes.add(index.getClassByName("org.springframework.data.repository.CrudRepository"));
classes.add(index.getClassByName("org.springframework.data.domain.Pageable"));
classes.add(index.getClassByName("org.springframework.data.domain.Specification"));

// explicitly register classes not present in the index
reflectiveClass.produce(ReflectiveClassBuildItem.builder(
com.github.mcollovati.quarkus.hilla.crud.spring.CrudRepositoryService.class,
com.github.mcollovati.quarkus.hilla.crud.spring.ListRepositoryService.class)
.constructors()
.methods()
.build());
}

if (capabilities.isPresent(QuarkusHillaExtensionProcessor.PANACHE_SUPPORT)) {
reflectiveClass.produce(ReflectiveClassBuildItem.builder(
com.github.mcollovati.quarkus.hilla.crud.panache.CrudRepositoryService.class,
com.github.mcollovati.quarkus.hilla.crud.panache.ListRepositoryService.class)
.constructors()
.methods()
.build());
}

reflectiveClass.produce(ReflectiveClassBuildItem.builder(classes.stream()
Expand Down

0 comments on commit 1b0b688

Please sign in to comment.