title: CalendarFX in combination with JavaFX: Module javafx.controls not found
body: <p>I am trying to use <a href="https://github.com/dlsc-software-consulting-gmbh/CalendarFX" rel="nofollow noreferrer">CalendarFX</a> as a gradle dependency in my JavaFX project with the <a href="https://github.com/openjfx/javafx-gradle-plugin" rel="nofollow noreferrer">gradle javafx plugin</a>, but I get the error that Module javafx.controls is nout found, while clearly specifying in the build.gradle file that it should use the <code>javafx.controls</code> module. My setup is this:</p>
  
  <p>build.gradle:</p>
  
  <pre><code>plugins {
      id 'java'
      id 'application'
      id 'org.openjfx.javafxplugin' version '0.0.8'
  }
  
  group 'org.example'
  version '1.0-SNAPSHOT'
  
  mainClassName = "org.example.MainApp"
  
  sourceCompatibility = 13
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      implementation 'com.calendarfx:view:11.8.3'
  }
  
  javafx {
      version = "13"
      modules = ['javafx.controls', 'javafx.fxml']
  }
  </code></pre>
  
  <p>MainApp.java:</p>
  
  <pre><code>package org.example;
  
  import com.calendarfx.model.Calendar;
  import com.calendarfx.model.CalendarSource;
  import com.calendarfx.view.CalendarView;
  import javafx.application.Application;
  import javafx.application.Platform;
  import javafx.scene.Scene;
  import javafx.scene.layout.StackPane;
  import javafx.stage.Stage;
  
  import java.time.LocalDate;
  import java.time.LocalTime;
  
  public class MainApp extends Application {
  
      @Override
      public void start(Stage primaryStage) throws Exception {
          CalendarView calendarView = new CalendarView();
  
          Calendar test = new Calendar("Test");
          test.setShortName("T");
          test.setStyle(Calendar.Style.STYLE1);
  
          CalendarSource familyCalendarSource = new CalendarSource("Source");
          familyCalendarSource.getCalendars().add(test);
  
          calendarView.getCalendarSources().setAll(familyCalendarSource);
          calendarView.setRequestedTime(LocalTime.now());
  
          StackPane stackPane = new StackPane();
          stackPane.getChildren().add(calendarView);
  
          Thread updateTimeThread = new Thread("Calendar: Update Time Thread") {
              @Override
              public void run() {
                  while (true) {
                      Platform.runLater(() -&gt; {
                          calendarView.setToday(LocalDate.now());
                          calendarView.setTime(LocalTime.now());
                      });
  
                      try {
                          // update every 10 seconds
                          sleep(10000);
                      } catch (InterruptedException e) {
                          e.printStackTrace();
                      }
  
                  }
              }
          };
  
          updateTimeThread.setPriority(Thread.MIN_PRIORITY);
          updateTimeThread.setDaemon(true);
          updateTimeThread.start();
  
          Scene scene = new Scene(stackPane);
          primaryStage.setTitle("Calendar");
          primaryStage.setScene(scene);
          primaryStage.setWidth(1300);
          primaryStage.setHeight(1000);
          primaryStage.centerOnScreen();
          primaryStage.show();
      }
  }
  </code></pre>
  
  <p>And the error I get when I try to run is:</p>
  
  <pre><code>$ ./gradlew run
  
  &gt; Task :run FAILED
  Error occurred during initialization of boot layer
  java.lang.module.FindException: Module javafx.controls not found
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':run'.
  &gt; Process 'command '/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 738ms
  3 actionable tasks: 2 executed, 1 up-to-date
  </code></pre>