diff options
author | 2021-07-29 17:09:24 +0200 | |
---|---|---|
committer | 2021-07-29 17:09:24 +0200 | |
commit | 97ea34af2f8e5d0ca9da5dda331a9f54e580c4c6 (patch) | |
tree | 2f58b2e34609439b53e3a7ddd5337bb4733ce707 /gradle/java-common.gradle | |
parent | Appearance fixes (diff) | |
download | refinery-97ea34af2f8e5d0ca9da5dda331a9f54e580c4c6.tar.gz refinery-97ea34af2f8e5d0ca9da5dda331a9f54e580c4c6.tar.zst refinery-97ea34af2f8e5d0ca9da5dda331a9f54e580c4c6.zip |
Refactoring based on Sonar reports
Diffstat (limited to 'gradle/java-common.gradle')
-rw-r--r-- | gradle/java-common.gradle | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/gradle/java-common.gradle b/gradle/java-common.gradle new file mode 100644 index 00000000..0cc09a4f --- /dev/null +++ b/gradle/java-common.gradle | |||
@@ -0,0 +1,50 @@ | |||
1 | repositories { | ||
2 | mavenCentral() | ||
3 | } | ||
4 | |||
5 | apply plugin: 'java' | ||
6 | apply plugin: 'org.xtext.xtend' | ||
7 | |||
8 | sourceCompatibility = '11' | ||
9 | targetCompatibility = '11' | ||
10 | |||
11 | sourceSets { | ||
12 | main { | ||
13 | xtendOutputDir = 'src/main/xtend-gen' | ||
14 | } | ||
15 | test { | ||
16 | xtendOutputDir = 'src/test/xtend-gen' | ||
17 | } | ||
18 | } | ||
19 | |||
20 | configurations.all { | ||
21 | exclude group: 'asm' | ||
22 | } | ||
23 | |||
24 | jar { | ||
25 | manifest { | ||
26 | attributes 'Bundle-SymbolicName': project.name | ||
27 | } | ||
28 | } | ||
29 | |||
30 | clean.doLast { | ||
31 | delete 'src/main/xtend-gen' | ||
32 | delete 'src/test/xtend-gen' | ||
33 | } | ||
34 | |||
35 | apply plugin: 'eclipse' | ||
36 | |||
37 | eclipse { | ||
38 | classpath.file.whenMerged { | ||
39 | for (entry in entries) { | ||
40 | if (entry.path.endsWith('-gen')) { | ||
41 | entry.entryAttributes['ignore_optional_problems'] = true | ||
42 | } | ||
43 | } | ||
44 | } | ||
45 | |||
46 | jdt.file.whenMerged { properties -> | ||
47 | // Allow @SupperessWarnings to suppress SonalLint warnings | ||
48 | properties['org.eclipse.jdt.core.compiler.problem.unhandledWarningToken'] = 'ignore' | ||
49 | } | ||
50 | } | ||