Skip to content

Commit bda2dfa

Browse files
Pr/jaredsburrows/update error messages (#422)
* update error messages
1 parent 915e67a commit bda2dfa

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/LicensePlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class LicensePlugin : Plugin<Project> {
1313
project.isAndroidProject() -> project.configureAndroidProject()
1414
project.isJavaProject() -> project.configureJavaProject()
1515
else -> throw UnsupportedOperationException(
16-
"'com.jaredsburrows.license' requires Java, Kotlin or Android Gradle Plugins.",
16+
"'com.jaredsburrows.license' requires Java, Kotlin or Android Gradle based plugins.",
1717
)
1818
}
1919
}

gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginJavaSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ final class LicensePluginJavaSpec extends Specification {
524524
buildFile <<
525525
"""
526526
plugins {
527-
id 'java'
527+
id 'java-library'
528528
id 'com.jaredsburrows.license'
529529
}
530530

gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginSpec.groovy

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import spock.lang.Specification
66
import spock.lang.Unroll
77

88
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
9-
import static org.gradle.testkit.runner.TaskOutcome.FAILED
109
import static test.TestUtils.gradleWithCommand
1110
import static test.TestUtils.gradleWithCommandWithFail
1211

@@ -49,7 +48,7 @@ final class LicensePluginSpec extends Specification {
4948
}
5049
}
5150
52-
apply plugin: 'java'
51+
apply plugin: 'java-library'
5352
apply plugin: 'com.jaredsburrows.license'
5453
"""
5554

@@ -82,15 +81,15 @@ final class LicensePluginSpec extends Specification {
8281
def result = gradleWithCommandWithFail(testProjectDir.root, 'licenseReport', '-s')
8382

8483
then:
85-
result.output.contains("'com.jaredsburrows.license' requires Java, Kotlin or Android Gradle Plugins.")
84+
result.output.contains("'com.jaredsburrows.license' requires Java, Kotlin or Android Gradle based plugins.")
8685
}
8786

8887
def 'apply plugin with plugins dsl'() {
8988
given:
9089
buildFile <<
9190
"""
9291
plugins {
93-
id 'java'
92+
id 'java-library'
9493
id 'com.jaredsburrows.license'
9594
}
9695
"""
@@ -115,7 +114,7 @@ final class LicensePluginSpec extends Specification {
115114
def result = gradleWithCommandWithFail(testProjectDir.root, 'licenseReport', '-s')
116115

117116
then:
118-
result.output.contains("'com.jaredsburrows.license' requires Java, Kotlin or Android Gradle Plugins.")
117+
result.output.contains("'com.jaredsburrows.license' requires Java, Kotlin or Android Gradle based plugins.")
119118
}
120119

121120
@Unroll
@@ -133,7 +132,7 @@ final class LicensePluginSpec extends Specification {
133132
def result = gradleWithCommandWithFail(testProjectDir.root, 'licenseReport', '-s')
134133

135134
then:
136-
result.output.contains("'com.jaredsburrows.license' requires Java, Kotlin or Android Gradle Plugins.")
135+
result.output.contains("'com.jaredsburrows.license' requires Java, Kotlin or Android Gradle based plugins.")
137136

138137
where:
139138
// https://github.com/gradle/gradle/find/master, search for "gradle-plugins"

gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginVersionSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class LicensePluginVersionSpec extends Specification {
4040
buildFile <<
4141
"""
4242
plugins {
43-
id 'java'
43+
id 'java-library'
4444
id 'com.jaredsburrows.license'
4545
}
4646
"""

0 commit comments

Comments
 (0)