I have a problem with the twilio module not being found in the project when using the javafx structure.
Error displayed:
13:50:40: Executing ':Main.main()'...
> Task :compileJava FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
1 actionable task: 1 executed
C:\Users\kksia\IDEA\Tinder\src\main\java\module-info.java:6: error: module not found: twilio
requires twilio;
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.
BUILD FAILED in 531ms
13:50:40: Execution finished ':Main.main()'.
My current state of the module-info.java file:
module com.tinder {
requires javafx.controls;
requires javafx.fxml;
requires java.sql;
requires twilio;
opens com.tinder to javafx.fxml;
exports com.tinder;
opens com.tinder.app to javafx.fxml ;
exports com.tinder.app;
exports com.tinder.app.controller;
opens com.tinder.app.controller to javafx.fxml;
}
And the build.gradle file which indicates that the twilio library has been downloaded:
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.1.0'
}
group = "com.tinder"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
javafx {
version = "21.0.2"
modules = [ 'javafx.controls', 'javafx.fxml' ]
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
implementation("mysql:mysql-connector-java:8.0.28")
implementation("com.twilio.sdk:twilio:10.1.0" )
implementation("com.sparkjava:spark-core:2.5.+" )
implementation("org.slf4j:slf4j-simple:1.6.+" )
}
tasks.test {
useJUnitPlatform()
}
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
I searched the entire internet, but none of the articles helped, so I thought I had to ask you about it. The only thing I found out on my own is that when using twilio on a pure gradle application, everything works, however, after adding the javafx structure to the application, the twilio module is not found.
