Skip to content
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

Migrate from javax to jakarta #3

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

plugins {
id 'org.openjfx.javafxplugin' version '0.0.13'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}

allprojects {
group = 'org.jabref'
version = '1.0.0'
Expand All @@ -8,16 +14,18 @@ allprojects {
}

apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.encoding = 'UTF-8'
}
javafx {
version = "19"
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.web', 'javafx.swing' ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this now work in the modularized world? Does this adds these modules twice now, once as dependency of afterburner and once as dep of the main application? Are they combined?

In either case, the web and swing modules shouldn't be needed, or are they?

Copy link
Member Author

@Siedlerchr Siedlerchr Sep 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project afterburner itself is not modularized, I used the shadow jar plugin. It generates two files:
One with all deps inside and one minimal shadow jar that only contains the classes itself. I used the latter to include it in jabref.

Main reason for this to avoid name clashes with the java ee stuff for the rest api
koppor/jabref#628

}

dependencies {
compile group: 'javax.inject', name: 'javax.inject', version:'1'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.8.0-beta1'
testCompile group: 'junit', name: 'junit', version:'4.12'
testCompile group: 'org.mockito', name: 'mockito-all', version:'1.10.19'
implementation 'jakarta.inject:jakarta.inject-api:2.0.1'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.8.0-beta1'
implementation group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '1.3.5'
testImplementation group: 'junit', name: 'junit', version:'4.12'
testImplementation group: 'org.mockito', name: 'mockito-all', version:'1.10.19'
}
2 changes: 1 addition & 1 deletion demo-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'application'
mainClassName = 'com.airhacks.afterburner.demo.DemoApplication'

dependencies {
compile rootProject
implementation rootProject
}

sourceSets {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-bin.zip
Loading