micronaut-guides/micronaut-creating-first-graal-app

The `complete` app does not build

Closed this issue · 2 comments

Not sure If I'm missing something here, but I cloned the repo, moved to the complete dire, and ran ./gradlew build and git hit by basic dependency resolution issues :

 ./gradlew build
Downloading https://services.gradle.org/distributions/gradle-6.5-bin.zip
.................................................................................................

Welcome to Gradle 6.5!

Here are the highlights of this release:
 - Experimental file-system watching
 - Improved version ordering
 - New samples

For more details see https://docs.gradle.org/6.5/release-notes.html

Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

> Task :complete:compileJava FAILED
/Users/jgjoseph/dev/micronaut-creating-first-graal-app/complete/src/main/java/example/micronaut/Application.java:3: error: package io.micronaut.runtime does not exist
import io.micronaut.runtime.Micronaut;
                           ^
/Users/jgjoseph/dev/micronaut-creating-first-graal-app/complete/src/main/java/example/micronaut/ConferenceService.java:3: error: package javax.inject does not exist
import javax.inject.Singleton;
                   ^
/Users/jgjoseph/dev/micronaut-creating-first-graal-app/complete/src/main/java/example/micronaut/ConferenceService.java:8: error: cannot find symbol
@Singleton // <1>
 ^
  symbol: class Singleton
/Users/jgjoseph/dev/micronaut-creating-first-graal-app/complete/src/main/java/example/micronaut/Conference.java:3: error: package io.micronaut.core.annotation does not exist
import io.micronaut.core.annotation.Introspected;

Adding the native Image task to the basic application creates a native image for that though.

Hi. We are in the middle of migrating all the guides to a new infrastructure that will allow us to upgrade them faster and easily and also run the tests.
This is a preliminary version of this guide already migrated to Micronaut 2.3.3. Can you please check if it works for you? https://micronaut-projects.github.io/micronaut-guides-poc/latest/micronaut-creating-first-graal-app-gradle-java.html

Thanks.

This works - and the fix was to set the micronaut version to 2.3.4 in gradle.properties. I can raise a PR for this.