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

[WIP] Use v8 for citeproc #3180

Closed
wants to merge 6 commits into from
Closed
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
33 changes: 32 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.internal.os.OperatingSystem

// to update the gradle wrapper, execute ./gradlew wrapper --gradle-version 4.0
Expand All @@ -10,6 +11,7 @@ plugins {
id "com.simonharrer.modernizer" version '1.5.0-1'
id 'me.champeau.gradle.jmh' version '0.4.3'
id 'net.ltgt.errorprone' version '0.0.11'
id 'com.lazan.javaflavours' version '1.2'
}

// use the gradle build scan feature: https://scans.gradle.com/get-started
Expand Down Expand Up @@ -53,9 +55,26 @@ repositories {
configurations {
antlr3
antlr4

linux_x86_64Compile.extendsFrom compile
macosx_x86_64Compile.extendsFrom compile
windows_x86_32Compile.extendsFrom compile
windows_x86_64Compile.extendsFrom compile
}

javaFlavours {
flavour 'linux_x86_64'
flavour 'macosx_x86_64'
flavour 'windows_x86_32'
flavour 'windows_x86_64'
}

dependencies {
linux_x86_64Compile group: 'com.eclipsesource.j2v8', name: 'j2v8_linux_x86_x64', version: '4.6.0'
macosx_x86_64Compile group: 'com.eclipsesource.j2v8', name: 'j2v8_macosx_x86_x64', version: '4.6.0'
windows_x86_32Compile group: 'com.eclipsesource.j2v8', name: 'j2v8_win32_x86', version: '4.6.0'
windows_x86_64Compile group: 'com.eclipsesource.j2v8', name: 'j2v8_win32_x86_x64', version: '4.6.0'

compile fileTree(dir: 'lib', includes: ['*.jar'])

compile 'com.jgoodies:jgoodies-common:1.8.1'
Expand Down Expand Up @@ -171,6 +190,18 @@ clean {
delete "src/main/gen"
}

def flavours = ['linux_x86_64', 'macosx_x86_64', 'windows_x86_32', 'windows_x86_64']
flavours.each { String flavour ->
SourceSet flavourSourceSet = sourceSets.getByName(flavour)
Configuration flavourRuntime = configurations.getByName("${flavour}Runtime")
JavaCompile flavourCompileTask = tasks.getByName("compile${flavour.capitalize()}Java")
Task shadowJarTask = tasks.create(name: "${flavour}ShadowJar", type: ShadowJar) {
classifier = "${flavour}-fat"
dependsOn flavourCompileTask
}
assemble.dependsOn shadowJarTask
}

task generateSource(dependsOn: ["generateBstGrammarSource", "generateSearchGrammarSource"]) {
group = 'JabRef'
description 'Generates all Java source files.'
Expand Down Expand Up @@ -359,7 +390,7 @@ checkstyle {
checkstyleMain.shouldRunAfter test
checkstyleTest.shouldRunAfter test

task release(dependsOn: ["media", "releaseJar"]) {
task release(dependsOn: ["media"]) {
group = 'JabRef - Release'
description 'Creates a release for all target platforms.'
}
Expand Down
5 changes: 5 additions & 0 deletions external-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ Project: AppleJavaExtensions
URL: https://developer.apple.com/legacy/library/samplecode/AppleJavaExtensions/Introduction/Intro.html
License: Apple License

Id: com.eclipse.j2v8
Project: J2V8
URL: https://github.com/eclipsesource/J2V8
Licence: EPL-1.0

Id: com.github.bkromhout:java-diff-utils
Project: java-diff-utils
URL: https://github.com/bkromhout/java-diff-utils
Expand Down