-
Notifications
You must be signed in to change notification settings - Fork 0
CodeRabbit Review #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: coderabbit
Are you sure you want to change the base?
Changes from all commits
759f996
9268841
0dbc456
62182fd
a12e40f
badf6e1
525c06e
e83758a
baf2a15
5523e4a
818719b
03c1056
5d9b1a7
facd46a
dfe3bbe
a30e1bb
df907a2
ea0c591
5b160c6
97c50d7
2d7c03c
8353048
59fc225
ef7271d
8bc28ff
d07dcc8
4f6852e
750a6bd
b67f73f
8eddbed
3b93b9a
352e901
c5854ad
9714d34
ca19d4f
43e435a
11de21f
56d2074
2df1e73
01664b9
f95f542
02375d4
bde1fce
4cd32f5
7a2c45d
8ba8871
5a99c81
0614488
ce8263f
f342cba
3aec0eb
c03b5e1
35dbd3f
36bc076
6615596
b5e81ae
b73902f
24eb5ab
e06a0c4
ac6329a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,7 @@ plugins { | |||||||||||||||||||||||||||||
| id 'java' | ||||||||||||||||||||||||||||||
| id 'application' | ||||||||||||||||||||||||||||||
| id 'com.github.johnrengelman.shadow' version '7.1.2' | ||||||||||||||||||||||||||||||
| id 'checkstyle' | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| repositories { | ||||||||||||||||||||||||||||||
|
|
@@ -11,6 +12,20 @@ repositories { | |||||||||||||||||||||||||||||
| dependencies { | ||||||||||||||||||||||||||||||
| testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.0' | ||||||||||||||||||||||||||||||
| testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.10.0' | ||||||||||||||||||||||||||||||
| String javaFxVersion = '17.0.7' | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'mac' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'win' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'mac' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'linux' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'win' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'mac' | ||||||||||||||||||||||||||||||
| implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'linux' | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| test { | ||||||||||||||||||||||||||||||
|
|
@@ -28,14 +43,20 @@ test { | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| application { | ||||||||||||||||||||||||||||||
| mainClass.set("seedu.duke.Duke") | ||||||||||||||||||||||||||||||
| mainClass.set("serenity.gui.Launcher") | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| shadowJar { | ||||||||||||||||||||||||||||||
| archiveBaseName = "duke" | ||||||||||||||||||||||||||||||
| archiveBaseName = "serenity" | ||||||||||||||||||||||||||||||
| archiveClassifier = null | ||||||||||||||||||||||||||||||
| archiveFileName = 'serenity.jar' | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
Comment on lines
49
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Set Main-Class in shaded JAR manifest. Ensures shadowJar {
archiveBaseName = "serenity"
archiveClassifier = null
archiveFileName = 'serenity.jar'
+ manifest {
+ attributes 'Main-Class': 'serenity.gui.Launcher'
+ }
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| checkstyle { | ||||||||||||||||||||||||||||||
| toolVersion = '10.2' | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| run{ | ||||||||||||||||||||||||||||||
| standardInput = System.in | ||||||||||||||||||||||||||||||
| enableAssertions = true; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Avoid bundling all OS JavaFX artifacts; use the OpenJFX Gradle plugin.
Shading win/mac/linux variants together bloats the JAR and can cause native clashes. Let the plugin resolve platform-specific artifacts at build/run time.
Add near the application block:
javafx { version = '17.0.7' modules = ['javafx.controls', 'javafx.fxml'] }Optional: pin toolchain to 17 for consistency with JavaFX 17.
java { toolchain { languageVersion = JavaLanguageVersion.of(17) } }🤖 Prompt for AI Agents