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 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
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'
]
}
}
34 changes: 34 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 Expand Up @@ -101,6 +127,14 @@ dependencyVerification {
'de.jensd:fontawesomefx-commons:5539bb3335ecb822dbf928546f57766eeb9f1516cc1417a064b5709629612149',
'com.googlecode.jcsv:jcsv:73ca7d715e90c8d2c2635cc284543b038245a34f70790660ed590e157b8714a2',
'com.github.sarxos:webcam-capture:d960b7ea8ec3ddf2df0725ef214c3fccc9699ea7772df37f544e1f8e4fd665f6',
'org.openjfx:javafx-fxml:ef5b10aa0b985e3bece34629bcaf4f462d3a60e1139a83edd116f69c1a36e0e8',
'org.openjfx:javafx-controls:689626346d7b390a46c7acd7741af19f91567110a6611cad50c60d8c611ac59f',
'org.openjfx:javafx-controls:dec3f34ca06ca9be71ce8c72646a31eb751b1df5a2b354dcd10fb64df842da4f',
'org.openjfx:javafx-swing:885a5ac37b82913dbfe2ed0742315b6275e8137f19b1135893cae42c4483591b',
'org.openjfx:javafx-graphics:753031848484aceead7d8d326be840b592a8de8e5938baabd477847b769eeef4',
'org.openjfx:javafx-graphics:6b846071b1fdae103f1b0e80c988d9d0b9cae37391b00f8ea3dc11e1e8e021b0',
'org.openjfx:javafx-base:2b062455f2792c2fc6406bb62d092593c490336584a74d283f8560b58a8eec07',
'org.openjfx:javafx-base:df7ef2e994be4a86153be0aaf0dcafa697ba4be0db55caefb8bda85e02d66ead',
'com.github.JesusMcCloud.netlayer:tor.native:de44e782b21838d3426dbff99abbfd1cbb8e5d3f6d5e997441ff4fd8354934fa',
'org.apache.httpcomponents:httpclient:db3d1b6c2d6a5e5ad47577ad61854e2f0e0936199b8e05eb541ed52349263135',
'net.sf.jopt-simple:jopt-simple:6f45c00908265947c39221035250024f2caec9a15c1c8cf553ebeecee289f342',
Expand Down