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

Use OpenJDK10 #1794

Merged
merged 6 commits into from
Oct 22, 2018
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: java
jdk: oraclejdk10
jdk: openjdk10
devinbileck marked this conversation as resolved.
Show resolved Hide resolved
before_install:
grep -v '^#' src/main/resources/META-INF/services/bisq.asset.Asset | sort --check --dictionary-order --ignore-case
notifications:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For more information, see https://bisq.network/intro and for step-by-step gettin

## Building Bisq

You will need [JDK 10](https://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html) installed to complete the following instructions.
You will need OpenJDK [JDK 10](https://jdk.java.net/10/) installed to complete the following instructions.

1. Clone the Bisq source code and cd into `bisq`

Expand Down Expand Up @@ -42,11 +42,11 @@ _The following instructions have been tested on IDEA 2018.2_
1. Go to `Preferences->Plugins`. Search for and install the _Lombok_ plugin. When prompted, do not restart IDEA.
1. Go to `Preferences->Build, Execution, Deployment->Compiler->Annotation Processors` and check the `Enable annotation processing` option (to enable processing of Lombok annotations)
1. Restart IDEA
1. Go to `Import Project`, select `settings.gradle` and click `Open`
1. Go to `Import Project`, select the `settings.gradle` file and click `Open`
1. In the `Import Project from Gradle` screen, check the `Use auto-import` option and click `OK`
1. When prompted whether to overwrite the existing `.idea` directory, click `Yes`
1. In the `Project` tool window, right click on the root-level `.idea` folder, select `Git->Revert...` and click OK in the dialog that appears (to restore source-controlled `.idea` configuration files that get overwritten during project import)
1. Go to `Build->Build project`. Everything should build cleanly. You should be able to run tests, run `main` methods in any component, etc.
1. Go to `Build->Build Project`. Everything should build cleanly. You should be able to run tests, run `main` methods in any component, etc.

> TIP: If you encounter compilation errors related to the `io.bisq.generated.protobuffer.PB` class, it is probably because you didn't run the full Gradle build above. You need to run the `generateProto` task in the `common` project. You can do this via the Gradle tool window in IDEA, or you can do it the command line with `cd common; ./gradlew generateProto`. Once you've done that, run `Build->Build project` again and you should have no errors.
> TIP: If you encounter compilation errors related to the `io.bisq.generated.protobuffer.PB` class, it is probably because you didn't run the full Gradle build above. You need to run the `generateProto` task in the `common` project. You can do this via the Gradle tool window in IDEA, or you can do it the command line with `cd common; ./gradlew generateProto`. Once you've done that, run `Build->Build Project` again and you should have no errors.

32 changes: 30 additions & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
// Note, version 1.6.0 of osdetector-gradle-plugin cannot be applied with a plugins block
// So a buildscript block is used
// See https://github.com/google/osdetector-gradle-plugin/issues/15
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.gradle:osdetector-gradle-plugin:1.6.0'
}
}

plugins {
id 'java'
id 'maven'
id 'com.google.protobuf' version '0.8.5'
devinbileck marked this conversation as resolved.
Show resolved Hide resolved
}

group = 'network.bisq'
version = '-SNAPSHOT'
apply plugin: 'com.google.osdetector'
devinbileck marked this conversation as resolved.
Show resolved Hide resolved

ext {
protobufVersion = '3.5.1'
platform = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os
}

group = 'network.bisq'
version = '-SNAPSHOT'

sourceCompatibility = 1.10

tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -59,4 +74,17 @@ dependencies {
compileOnly 'org.projectlombok:lombok:1.18.2'
annotationProcessor 'org.projectlombok:lombok:1.18.2'
testCompile 'junit:junit:4.12'

compile "org.openjfx:javafx-base:11:$platform"
compile "org.openjfx:javafx-graphics:11:$platform"
compile "org.openjfx:javafx-controls:11:$platform"
}

compileJava {
doFirst {
options.compilerArgs = [
'--module-path', classpath.asPath,
'--add-modules', 'javafx.controls'
]
}
}
26 changes: 26 additions & 0 deletions desktop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ buildscript {
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
classpath files('gradle/witness/gradle-witness.jar')
classpath 'com.google.gradle:osdetector-gradle-plugin:1.6.0'
}
}

Expand All @@ -13,6 +14,9 @@ apply plugin: 'application'
apply plugin: 'maven'
apply plugin: 'witness'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.google.osdetector'

ext.platform = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os

group = 'network.bisq'
version = '0.8.0-SNAPSHOT'
Expand Down Expand Up @@ -55,6 +59,11 @@ dependencies {
compile 'de.jensd:fontawesomefx-materialdesignfont:2.0.26-9.1.2'
compile 'com.googlecode.jcsv:jcsv:1.4.0'
compile 'com.github.sarxos:webcam-capture:0.3.12'
compile "org.openjfx:javafx-base:11:$platform"
compile "org.openjfx:javafx-graphics:11:$platform"
compile "org.openjfx:javafx-controls:11:$platform"
compile "org.openjfx:javafx-fxml:11:$platform"
compile "org.openjfx:javafx-swing:11:$platform"


compileOnly 'org.projectlombok:lombok:1.18.2'
Expand All @@ -72,6 +81,23 @@ dependencies {
testAnnotationProcessor 'org.projectlombok:lombok:1.18.2'
}

compileJava {
doFirst {
options.compilerArgs = [
'--module-path', classpath.asPath,
'--add-modules', 'javafx.controls'
]
}
}
run {
doFirst {
jvmArgs = [
'--module-path', classpath.asPath,
'--add-modules', 'javafx.controls'
]
}
}

test {
systemProperty 'jdk.attach.allowAttachSelf', true

Expand Down