Skip to content

Commit

Permalink
Merge pull request #5264 from JabRef/eclipsejava11
Browse files Browse the repository at this point in the history
[WIP] Get JabRef running in eclipse
  • Loading branch information
Siedlerchr authored Sep 4, 2019
2 parents cce5008 + b57fed0 commit 21ab1d2
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "src/main/resources/csl-styles"]
path = src/main/resources/csl-styles
url = https://github.com/citation-style-language/styles.git
[submodule "src/main/resources/csl-locales"]
path = src/main/resources/csl-locales
url = https://github.com/citation-style-language/locales.git
32 changes: 27 additions & 5 deletions eclipse.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,39 @@ eclipseJdt.doLast {
f.append('encoding/<project>=UTF-8')
}
eclipse {
//add libraries to module path: https://github.com/eclipse/buildship/issues/620#issuecomment-390469550
classpath {
project {
natures 'org.eclipse.buildship.core.gradleprojectnature'
}

classpath {
file {
whenMerged {
entries.findAll {
it.kind == 'src' || it.kind == 'lib'
}.each { it.entryAttributes['module'] = 'true' }
entries.findAll { isModule(it) }.each { //(1)
it.entryAttributes['module'] = 'true'
}

entries.findAll { isSource(it) && isTestScope(it) }.each {
it.entryAttributes['test'] = 'true'
}

entries.findAll { isLibrary(it) && isTestScope(it) }.each {
it.entryAttributes['test'] = 'true'
}
}
}

defaultOutputDir = file('build')
downloadSources = true
downloadJavadoc = true
}
}

boolean isLibrary(entry) { return entry.properties.kind.equals('lib') }
boolean isTestScope(entry) { return entry.entryAttributes.get('gradle_used_by_scope').equals('test'); }
boolean isModule(entry) { isLibrary(entry) && !isTestScope(entry); }
boolean isSource(entry) { return entry.properties.kind.equals('src'); }


// add formatter and cleanup settings to Eclipse settings
// see http://stackoverflow.com/a/27461890/873282

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/JabRefMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void main(String[] args) {
public void start(Stage mainStage) throws Exception {
try {
// Fail on unsupported Java versions
ensureCorrectJavaVersion();
// ensureCorrectJavaVersion();
FallbackExceptionHandler.installExceptionHandler();

// Init preferences
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/csl-styles
Submodule csl-styles deleted from fa125e

0 comments on commit 21ab1d2

Please sign in to comment.