-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set spotbugs tasks default heap size to 1g to mimic old behaviour in …
…gradle 5 (#12)
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/test/groovy/ru/vyarus/gradle/plugin/quality/SpotbugsHeapSizeSettingTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package ru.vyarus.gradle.plugin.quality | ||
|
||
|
||
import org.gradle.api.Project | ||
|
||
/** | ||
* @author Vyacheslav Rusakov | ||
* @since 16.02.2019 | ||
*/ | ||
class SpotbugsHeapSizeSettingTest extends AbstractTest { | ||
|
||
def "Check default max heap size set"() { | ||
|
||
when: "apply plugin" | ||
file('src/main/java').mkdirs() | ||
|
||
Project project = project { | ||
apply plugin: 'java' | ||
apply plugin: 'ru.vyarus.quality' | ||
} | ||
|
||
then: "maxHeapSize set" | ||
project.tasks.spotbugsMain.maxHeapSize == '1g' | ||
} | ||
|
||
|
||
def "Check manual max heap size not overridden"() { | ||
|
||
when: "apply plugin" | ||
file('src/main/java').mkdirs() | ||
|
||
Project project = project { | ||
apply plugin: 'java' | ||
apply plugin: 'com.github.spotbugs' | ||
apply plugin: 'ru.vyarus.quality' | ||
|
||
spotbugsMain.maxHeapSize = '2g' | ||
} | ||
|
||
then: "maxHeapSize not overridden" | ||
project.tasks.spotbugsMain.maxHeapSize == '2g' | ||
} | ||
} |