diff options
author | 2022-09-25 20:14:42 +0200 | |
---|---|---|
committer | 2022-10-03 20:06:52 +0200 | |
commit | 89d6f019f764532d85d1f7499355e1cd3075f0b5 (patch) | |
tree | bc007da572948f9de1df5bc7497cda6f6a1fa752 /buildSrc/src/main/groovy/refinery-eclipse.gradle | |
parent | feat: data structure for assertion merging (diff) | |
download | refinery-89d6f019f764532d85d1f7499355e1cd3075f0b5.tar.gz refinery-89d6f019f764532d85d1f7499355e1cd3075f0b5.tar.zst refinery-89d6f019f764532d85d1f7499355e1cd3075f0b5.zip |
chore: fix some warnings
Diffstat (limited to 'buildSrc/src/main/groovy/refinery-eclipse.gradle')
-rw-r--r-- | buildSrc/src/main/groovy/refinery-eclipse.gradle | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/buildSrc/src/main/groovy/refinery-eclipse.gradle b/buildSrc/src/main/groovy/refinery-eclipse.gradle index ec8b9f6c..15dcb5ce 100644 --- a/buildSrc/src/main/groovy/refinery-eclipse.gradle +++ b/buildSrc/src/main/groovy/refinery-eclipse.gradle | |||
@@ -5,19 +5,20 @@ plugins { | |||
5 | // Workaround from https://github.com/gradle/gradle/issues/898#issuecomment-885765821 | 5 | // Workaround from https://github.com/gradle/gradle/issues/898#issuecomment-885765821 |
6 | def eclipseResourceEncoding = tasks.register('eclipseResourceEncoding') { | 6 | def eclipseResourceEncoding = tasks.register('eclipseResourceEncoding') { |
7 | ext.outputFile = file('.settings/org.eclipse.core.resources.prefs') | 7 | ext.outputFile = file('.settings/org.eclipse.core.resources.prefs') |
8 | def compileTask = tasks.findByName('compileJava') | 8 | def compileTask = tasks.findByName('compileJava') |
9 | ext.encoding = provider({ compileTask?.options?.encoding }).orElse(providers.systemProperty('file.encoding')) | 9 | ext.encoding = provider({ compileTask?.options?.encoding }).orElse(providers.systemProperty('file.encoding')) |
10 | 10 | ||
11 | inputs.property("file.encoding", encoding) | 11 | inputs.property('file.encoding', encoding) |
12 | outputs.file(outputFile).withPropertyName('outputFile') | 12 | outputs.file(outputFile).withPropertyName('outputFile') |
13 | 13 | ||
14 | doLast { | 14 | doLast { |
15 | Properties eclipseEncodingProperties = new Properties(Collections.singletonMap('eclipse.preferences.version','1')) | 15 | Properties eclipseEncodingProperties = |
16 | eclipseEncodingProperties.put('encoding/<project>', encoding.get()) | 16 | new Properties(Collections.singletonMap('eclipse.preferences.version', '1')) |
17 | outputFile.withOutputStream { | 17 | eclipseEncodingProperties.put('encoding/<project>', encoding.get()) |
18 | eclipseEncodingProperties.store(it, 'generated by ' + name) | 18 | outputFile.withOutputStream { |
19 | } | 19 | eclipseEncodingProperties.store(it, 'generated by ' + name) |
20 | } | 20 | } |
21 | } | ||
21 | } | 22 | } |
22 | 23 | ||
23 | tasks.named('eclipse') { | 24 | tasks.named('eclipse') { |