From 4376ea80eec4ad7da88dfedc2ecaf855e79168d3 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Mon, 17 Dec 2018 16:53:07 +0200 Subject: [PATCH] Fix failing tests (#534) --- build.gradle | 4 +- config/codenarc/ruleset-test.groovy | 399 ------------------ config/codenarc/ruleset.groovy | 12 +- .../plugin/tests/IntegrationTest.groovy | 26 +- .../devsoap/plugin/tests/KotlinTest.groovy | 4 +- .../tests/MultiProjectIntegrationTest.groovy | 2 +- .../MultimoduleWidgetsetThemeTest.groovy | 12 +- .../plugin/tests/SpringBootTest.groovy | 28 +- .../tests/TaskConfigurationsTest.groovy | 4 +- .../plugin/extensions/AddonExtension.groovy | 5 +- 10 files changed, 42 insertions(+), 454 deletions(-) delete mode 100644 config/codenarc/ruleset-test.groovy diff --git a/build.gradle b/build.gradle index 32440768..8d3d116b 100644 --- a/build.gradle +++ b/build.gradle @@ -307,7 +307,7 @@ task proxyTest(type:Test, dependsOn: ['test','jar']) { include '**/tests/*ProxyTest*' systemProperty 'integrationTestProjectVersion', version testClassesDirs = sourceSets.functionalTest.output.classesDirs - classpath += sourceSets.functionalTest.runtimeClasspath + configurations.proxyTest + classpath = configurations.proxyTest + sourceSets.functionalTest.runtimeClasspath } /** @@ -348,7 +348,7 @@ codenarc{ maxPriority2Violations = 0 maxPriority3Violations = 500 codenarcTest { - configFile = rootProject.file('config/codenarc/ruleset-test.groovy') + configFile = rootProject.file('config/codenarc/ruleset-functionalTest.groovy') } } diff --git a/config/codenarc/ruleset-test.groovy b/config/codenarc/ruleset-test.groovy deleted file mode 100644 index b00a8ed6..00000000 --- a/config/codenarc/ruleset-test.groovy +++ /dev/null @@ -1,399 +0,0 @@ -ruleset { - - description ''' - A Sample Groovy RuleSet containing all CodeNarc Rules, grouped by category. - You can use this as a template for your own custom RuleSet. - Just delete the rules that you don't want to include. - ''' - - // rulesets/basic.xml - AssertWithinFinallyBlock - AssignmentInConditional - BigDecimalInstantiation - BitwiseOperatorInConditional - BooleanGetBoolean - BrokenNullCheck - BrokenOddnessCheck - ClassForName - ComparisonOfTwoConstants - ComparisonWithSelf - ConstantAssertExpression - ConstantIfExpression - ConstantTernaryExpression - DeadCode - DoubleNegative - DuplicateCaseStatement - DuplicateMapKey - DuplicateSetValue - EmptyCatchBlock - EmptyClass - EmptyElseBlock - EmptyFinallyBlock - EmptyForStatement - EmptyIfStatement - EmptyInstanceInitializer - EmptyMethod - EmptyStaticInitializer - EmptySwitchStatement - EmptySynchronizedStatement - EmptyTryBlock - EmptyWhileStatement - EqualsAndHashCode - EqualsOverloaded - ExplicitGarbageCollection - ForLoopShouldBeWhileLoop - HardCodedWindowsFileSeparator - HardCodedWindowsRootDirectory - IntegerGetInteger - MultipleUnaryOperators - RandomDoubleCoercedToZero - RemoveAllOnSelf - ReturnFromFinallyBlock - ThrowExceptionFromFinallyBlock - - // rulesets/braces.xml - ElseBlockBraces - ForStatementBraces - IfStatementBraces - WhileStatementBraces - - // rulesets/concurrency.xml - BusyWait - DoubleCheckedLocking - InconsistentPropertyLocking - InconsistentPropertySynchronization - NestedSynchronization - StaticCalendarField - StaticConnection - StaticDateFormatField - StaticMatcherField - StaticSimpleDateFormatField - SynchronizedMethod - SynchronizedOnBoxedPrimitive - SynchronizedOnGetClass - SynchronizedOnReentrantLock - SynchronizedOnString - SynchronizedOnThis - SynchronizedReadObjectMethod - SystemRunFinalizersOnExit - ThisReferenceEscapesConstructor - ThreadGroup - ThreadLocalNotStaticFinal - ThreadYield - UseOfNotifyMethod - VolatileArrayField - VolatileLongOrDoubleField - WaitOutsideOfWhileLoop - - // rulesets/convention.xml - ConfusingTernary - CouldBeElvis - HashtableIsObsolete - IfStatementCouldBeTernary - InvertedIfElse - LongLiteralWithLowerCaseL - NoDef - NoTabCharacter - ParameterReassignment - TernaryCouldBeElvis - TrailingComma - VectorIsObsolete - - // rulesets/design.xml - AbstractClassWithPublicConstructor - AbstractClassWithoutAbstractMethod - AssignmentToStaticFieldFromInstanceMethod - BooleanMethodReturnsNull - BuilderMethodWithSideEffects - CloneableWithoutClone - CloseWithoutCloseable - CompareToWithoutComparable - ConstantsOnlyInterface - EmptyMethodInAbstractClass - FinalClassWithProtectedMember - ImplementationAsType - Instanceof - LocaleSetDefault - NestedForLoop - PrivateFieldCouldBeFinal - //PublicInstanceField - ReturnsNullInsteadOfEmptyArray - ReturnsNullInsteadOfEmptyCollection - SimpleDateFormatMissingLocale - StatelessSingleton - ToStringReturnsNull - - // rulesets/dry.xml - DuplicateListLiteral - DuplicateMapLiteral - DuplicateNumberLiteral - DuplicateStringLiteral - - // rulesets/enhanced.xml - //CloneWithoutCloneable - //JUnitAssertEqualsConstantActualValue - //UnsafeImplementationAsMap - - // rulesets/exceptions.xml - CatchArrayIndexOutOfBoundsException - CatchError - CatchException - CatchIllegalMonitorStateException - CatchIndexOutOfBoundsException - CatchNullPointerException - CatchRuntimeException - CatchThrowable - ConfusingClassNamedException - ExceptionExtendsError - ExceptionExtendsThrowable - ExceptionNotThrown - MissingNewInThrowStatement - ReturnNullFromCatchBlock - SwallowThreadDeath - ThrowError - ThrowException - ThrowNullPointerException - ThrowRuntimeException - ThrowThrowable - - // rulesets/formatting.xml - BlankLineBeforePackage - BracesForClass - BracesForForLoop - BracesForIfElse - BracesForMethod - BracesForTryCatchFinally - ClassJavadoc - ClosureStatementOnOpeningLineOfMultipleLineClosure - ConsecutiveBlankLines - FileEndsWithoutNewline - LineLength - MissingBlankLineAfterImports - MissingBlankLineAfterPackage - SpaceAfterCatch - SpaceAfterClosingBrace - SpaceAfterComma - SpaceAfterFor - SpaceAfterIf - SpaceAfterOpeningBrace - SpaceAfterSemicolon - SpaceAfterSwitch - SpaceAfterWhile - SpaceAroundClosureArrow - SpaceAroundMapEntryColon - SpaceAroundOperator - SpaceBeforeClosingBrace - SpaceBeforeOpeningBrace - TrailingWhitespace - - // rulesets/generic.xml - IllegalClassMember - IllegalClassReference - IllegalPackageReference - IllegalRegex - IllegalString - IllegalSubclass - RequiredRegex - RequiredString - StatelessClass - - // rulesets/grails.xml - GrailsDomainHasEquals - GrailsDomainHasToString - GrailsDomainReservedSqlKeywordName - GrailsDomainWithServiceReference - GrailsDuplicateConstraint - GrailsDuplicateMapping - GrailsMassAssignment - GrailsPublicControllerMethod - GrailsServletContextReference - GrailsStatelessService - - // rulesets/groovyism.xml - AssignCollectionSort - AssignCollectionUnique - ClosureAsLastMethodParameter - CollectAllIsDeprecated - ConfusingMultipleReturns - ExplicitArrayListInstantiation - ExplicitCallToAndMethod - ExplicitCallToCompareToMethod - ExplicitCallToDivMethod - ExplicitCallToEqualsMethod - ExplicitCallToGetAtMethod - ExplicitCallToLeftShiftMethod - ExplicitCallToMinusMethod - ExplicitCallToModMethod - ExplicitCallToMultiplyMethod - ExplicitCallToOrMethod - ExplicitCallToPlusMethod - ExplicitCallToPowerMethod - ExplicitCallToRightShiftMethod - ExplicitCallToXorMethod - ExplicitHashMapInstantiation - ExplicitHashSetInstantiation - ExplicitLinkedHashMapInstantiation - ExplicitLinkedListInstantiation - ExplicitStackInstantiation - ExplicitTreeSetInstantiation - GStringAsMapKey - GStringExpressionWithinString - GetterMethodCouldBeProperty - GroovyLangImmutable - UseCollectMany - UseCollectNested - - // rulesets/imports.xml - DuplicateImport - ImportFromSamePackage - ImportFromSunPackages - MisorderedStaticImports - NoWildcardImports - UnnecessaryGroovyImport - UnusedImport - - // rulesets/jdbc.xml - DirectConnectionManagement - JdbcConnectionReference - JdbcResultSetReference - JdbcStatementReference - - // rulesets/junit.xml - ChainedTest - CoupledTestCase - JUnitAssertAlwaysFails - JUnitAssertAlwaysSucceeds - JUnitFailWithoutMessage - JUnitLostTest - JUnitPublicField - //JUnitPublicNonTestMethod - //JUnitPublicProperty - JUnitSetUpCallsSuper - JUnitStyleAssertions - JUnitTearDownCallsSuper - //JUnitTestMethodWithoutAssert - JUnitUnnecessarySetUp - JUnitUnnecessaryTearDown - JUnitUnnecessaryThrowsException - SpockIgnoreRestUsed - UnnecessaryFail - UseAssertEqualsInsteadOfAssertTrue - UseAssertFalseInsteadOfNegation - UseAssertNullInsteadOfAssertEquals - UseAssertSameInsteadOfAssertTrue - UseAssertTrueInsteadOfAssertEquals - UseAssertTrueInsteadOfNegation - - // rulesets/logging.xml - LoggerForDifferentClass - LoggerWithWrongModifiers - LoggingSwallowsStacktrace - MultipleLoggers - PrintStackTrace - //Println - SystemErrPrint - SystemOutPrint - - // rulesets/naming.xml - AbstractClassName - ClassName - ClassNameSameAsFilename - ClassNameSameAsSuperclass - ConfusingMethodName - FactoryMethodName - //FieldName - InterfaceName - InterfaceNameSameAsSuperInterface - //MethodName - ObjectOverrideMisspelledMethodName - PackageName - PackageNameMatchesFilePath - ParameterName - //PropertyName - VariableName - - // rulesets/security.xml - FileCreateTempFile - InsecureRandom - //JavaIoPackageAccess - //NonFinalPublicField - NonFinalSubclassOfSensitiveInterface - ObjectFinalize - PublicFinalizeMethod - SystemExit - UnsafeArrayDeclaration - - // rulesets/serialization.xml - EnumCustomSerializationIgnored - SerialPersistentFields - SerialVersionUID - SerializableClassMustDefineSerialVersionUID - - // rulesets/size.xml - //AbcComplexity // DEPRECATED: Use the AbcMetric rule instead. Requires the GMetrics jar - //AbcMetric // Requires the GMetrics jar - ClassSize - //CrapMetric // Requires the GMetrics jar and a Cobertura coverage file - CyclomaticComplexity // Requires the GMetrics jar - //MethodCount - MethodSize - //NestedBlockDepth - ParameterCount - - // rulesets/unnecessary.xml - AddEmptyString - ConsecutiveLiteralAppends - ConsecutiveStringConcatenation - UnnecessaryBigDecimalInstantiation - UnnecessaryBigIntegerInstantiation - UnnecessaryBooleanExpression - UnnecessaryBooleanInstantiation - UnnecessaryCallForLastElement - UnnecessaryCallToSubstring - UnnecessaryCast - UnnecessaryCatchBlock - UnnecessaryCollectCall - UnnecessaryCollectionCall - UnnecessaryConstructor - UnnecessaryDefInFieldDeclaration - UnnecessaryDefInMethodDeclaration - UnnecessaryDefInVariableDeclaration - UnnecessaryDotClass - UnnecessaryDoubleInstantiation - UnnecessaryElseStatement - UnnecessaryFinalOnPrivateMethod - UnnecessaryFloatInstantiation - UnnecessaryGString - UnnecessaryGetter - UnnecessaryIfStatement - UnnecessaryInstanceOfCheck - UnnecessaryInstantiationToGetClass - UnnecessaryIntegerInstantiation - UnnecessaryLongInstantiation - UnnecessaryModOne - UnnecessaryNullCheck - UnnecessaryNullCheckBeforeInstanceOf - UnnecessaryObjectReferences - UnnecessaryOverridingMethod - UnnecessaryPackageReference - UnnecessaryParenthesesForMethodCallWithClosure - UnnecessaryPublicModifier - UnnecessaryReturnKeyword - UnnecessarySafeNavigationOperator - UnnecessarySelfAssignment - UnnecessarySemicolon - UnnecessaryStringInstantiation - UnnecessarySubstring - UnnecessaryTernaryExpression - UnnecessaryToString - UnnecessaryTransientModifier - - // rulesets/unused.xml - UnusedArray - UnusedMethodParameter - UnusedObject - UnusedPrivateField - UnusedPrivateMethod - UnusedPrivateMethodParameter - UnusedVariable -} \ No newline at end of file diff --git a/config/codenarc/ruleset.groovy b/config/codenarc/ruleset.groovy index c6f53ec6..9281ff09 100644 --- a/config/codenarc/ruleset.groovy +++ b/config/codenarc/ruleset.groovy @@ -116,7 +116,7 @@ ruleset { LocaleSetDefault NestedForLoop PrivateFieldCouldBeFinal - PublicInstanceField + //PublicInstanceField //ReturnsNullInsteadOfEmptyArray //ReturnsNullInsteadOfEmptyCollection SimpleDateFormatMissingLocale @@ -266,12 +266,12 @@ ruleset { JUnitFailWithoutMessage JUnitLostTest JUnitPublicField - JUnitPublicNonTestMethod - JUnitPublicProperty + //JUnitPublicNonTestMethod + //JUnitPublicProperty JUnitSetUpCallsSuper JUnitStyleAssertions JUnitTearDownCallsSuper - JUnitTestMethodWithoutAssert + //JUnitTestMethodWithoutAssert JUnitUnnecessarySetUp JUnitUnnecessaryTearDown JUnitUnnecessaryThrowsException @@ -304,7 +304,7 @@ ruleset { //FieldName InterfaceName InterfaceNameSameAsSuperInterface - MethodName + //MethodName ObjectOverrideMisspelledMethodName PackageName PackageNameMatchesFilePath @@ -316,7 +316,7 @@ ruleset { FileCreateTempFile InsecureRandom //JavaIoPackageAccess - NonFinalPublicField + //NonFinalPublicField NonFinalSubclassOfSensitiveInterface ObjectFinalize PublicFinalizeMethod diff --git a/src/functionalTest/groovy/com/devsoap/plugin/tests/IntegrationTest.groovy b/src/functionalTest/groovy/com/devsoap/plugin/tests/IntegrationTest.groovy index aa0abf7e..70d395cb 100644 --- a/src/functionalTest/groovy/com/devsoap/plugin/tests/IntegrationTest.groovy +++ b/src/functionalTest/groovy/com/devsoap/plugin/tests/IntegrationTest.groovy @@ -28,6 +28,11 @@ import java.nio.file.Paths */ class IntegrationTest { + private static final List DEFAULT_ARGS = [ + '--stacktrace', + '--warning-mode', 'all' + ] + @Rule public TemporaryFolder projectDir = new TemporaryFolder() @@ -116,27 +121,22 @@ class IntegrationTest { buildFile << "apply plugin:com.devsoap.plugin.GradleVaadinPlugin\n" } - protected String runWithArgumentsOnProject(File projectDir, String... args) { - setupRunner(projectDir) - .withArguments((args as List) + ['--stacktrace']) - .build() - .output - } - protected String runWithArguments(String... args) { - runWithArgumentsOnProject(projectDir.root, args) + GradleRunner runner = setupRunner(projectDir.root) + .withArguments( DEFAULT_ARGS + (args as List)) + println "Running gradle ${runner.arguments.join(' ')}" + runner.build().output } protected String runFailureExpected() { - setupRunner() - .withArguments(['--stacktrace']) - .buildAndFail() - .output + GradleRunner runner = setupRunner().withArguments(DEFAULT_ARGS) + println "Running gradle ${runner.arguments.join(' ')}" + runner.buildAndFail().output } protected String runFailureExpected(String... args) { setupRunner() - .withArguments((args as List) + ['--stacktrace']) + .withArguments(DEFAULT_ARGS + (args as List)) .buildAndFail() .output } diff --git a/src/functionalTest/groovy/com/devsoap/plugin/tests/KotlinTest.groovy b/src/functionalTest/groovy/com/devsoap/plugin/tests/KotlinTest.groovy index 3d3e0467..4af660b2 100644 --- a/src/functionalTest/groovy/com/devsoap/plugin/tests/KotlinTest.groovy +++ b/src/functionalTest/groovy/com/devsoap/plugin/tests/KotlinTest.groovy @@ -28,7 +28,7 @@ class KotlinTest extends KotlinIntegrationTest { @Parameterized.Parameters(name = "Kotlin {0}") static Collection getKotlinVersions() { - [ '1.1.3-2'] + [ '1.3.11'] } @Test void 'Create project'() { @@ -44,7 +44,7 @@ class KotlinTest extends KotlinIntegrationTest { runWithArguments('classes') File classes = Paths.get(projectDir.root.canonicalPath, - 'build', 'classes', 'java', 'main', 'com','example', 'helloworld').toFile() + 'build', 'classes', 'kotlin', 'main', 'com','example', 'helloworld').toFile() assertTrue 'Classes should exist', classes.exists() assertTrue 'Servlet not compiled', new File(classes, 'HelloWorldServlet.class').exists() assertTrue 'UI not compiled', new File(classes, 'HelloWorldUI.class').exists() diff --git a/src/functionalTest/groovy/com/devsoap/plugin/tests/MultiProjectIntegrationTest.groovy b/src/functionalTest/groovy/com/devsoap/plugin/tests/MultiProjectIntegrationTest.groovy index 6cab3902..b0f218fb 100644 --- a/src/functionalTest/groovy/com/devsoap/plugin/tests/MultiProjectIntegrationTest.groovy +++ b/src/functionalTest/groovy/com/devsoap/plugin/tests/MultiProjectIntegrationTest.groovy @@ -49,7 +49,7 @@ class MultiProjectIntegrationTest extends IntegrationTest { protected File makeProject(String name) { File projectDir = projectDir.newFolder(name) - settingsFile << "include '$name'\n" + settingsFile << "include ':$name'\n" projectDir } } diff --git a/src/functionalTest/groovy/com/devsoap/plugin/tests/MultimoduleWidgetsetThemeTest.groovy b/src/functionalTest/groovy/com/devsoap/plugin/tests/MultimoduleWidgetsetThemeTest.groovy index bdc8dba2..5eb119c2 100644 --- a/src/functionalTest/groovy/com/devsoap/plugin/tests/MultimoduleWidgetsetThemeTest.groovy +++ b/src/functionalTest/groovy/com/devsoap/plugin/tests/MultimoduleWidgetsetThemeTest.groovy @@ -38,6 +38,8 @@ class MultimoduleWidgetsetThemeTest extends MultiProjectIntegrationTest { jar.from 'src/main/webapp' """.stripIndent() + runWithArguments(":$widgetsetModule.name:$CreateComponentTask.NAME", '--name=MyLabel') + File themeModule = makeProject('theme-module') File themeModuleBuildFile = makeBuildFile(themeModule) themeModuleBuildFile << """ @@ -51,6 +53,8 @@ class MultimoduleWidgetsetThemeTest extends MultiProjectIntegrationTest { jar.from 'src/main/webapp' """.stripIndent() + runWithArguments(":$themeModule.name:$CreateThemeTask.NAME", '--name=AppTheme') + File appModule = makeProject('app') File appBuildFile = makeBuildFile(appModule) appBuildFile << """ @@ -70,15 +74,13 @@ class MultimoduleWidgetsetThemeTest extends MultiProjectIntegrationTest { } """.stripIndent() - runWithArgumentsOnProject(themeModule, CreateThemeTask.NAME, '--name=AppTheme') - runWithArgumentsOnProject(widgetsetModule, CreateComponentTask.NAME, '--name=MyLabel') - runWithArguments("app:$CreateProjectTask.NAME") + runWithArguments(":app:$CreateProjectTask.NAME") // Remove generated theme from app Paths.get(appModule.canonicalPath, 'src', 'main', 'webapp').deleteDir() // Generate war - String result = runWithArguments('app:war') + String result = runWithArguments(':app:war') assertTrue result, result.contains('BUILD SUCCESSFUL') } @@ -106,7 +108,7 @@ class MultimoduleWidgetsetThemeTest extends MultiProjectIntegrationTest { jar.from 'src/main/webapp' """.stripIndent() - runWithArgumentsOnProject(themeModule, CreateThemeTask.NAME, '--name=AppTheme') + runWithArguments("$themeModule.name:$CreateThemeTask.NAME", '--name=AppTheme') runWithArguments(CreateProjectTask.NAME) runWithArguments(BuildClassPathJar.NAME) diff --git a/src/functionalTest/groovy/com/devsoap/plugin/tests/SpringBootTest.groovy b/src/functionalTest/groovy/com/devsoap/plugin/tests/SpringBootTest.groovy index 95b8cf91..b864e521 100644 --- a/src/functionalTest/groovy/com/devsoap/plugin/tests/SpringBootTest.groovy +++ b/src/functionalTest/groovy/com/devsoap/plugin/tests/SpringBootTest.groovy @@ -113,14 +113,14 @@ class SpringBootTest extends IntegrationTest { // Static resources assertJarContents(jar, 'Widgetset not found in jar', 'BOOT-INF/classes/VAADIN/widgetsets/com.example.springboottest.MyWidgetset/') - assertJarContents(jar, 'Theme not found in jar', 'BOOT-INF/classes/VAADIN/themes/SpringBootTest/') + assertJarContents(jar, 'Theme not found in jar', 'BOOT-INF/classes/VAADIN/themes/MyApp/') // Classes assertJarContents(jar, 'UI not found in jar', 'BOOT-INF/classes/com/example/springboottest/MyAppUI.class') assertJarContents(jar, 'App not found in jar', - 'BOOT-INF/classes/com/example/springboottest/SpringBootApplication.class') + 'BOOT-INF/classes/com/example/springboottest/MyAppApplication.class') assertJarContents(jar, 'Spring Boot loader not found in jar', 'org/springframework/boot/loader/') } @@ -165,31 +165,15 @@ class SpringBootTest extends IntegrationTest { } private void configureSpringBootProject() { - runWithArguments(CreateProjectTask.NAME, '--name=SpringBootTest') - - File packageDir = Paths.get(projectDir.root.canonicalPath, - 'src', 'main', 'java', 'com', 'example', 'springboottest').toFile() - - File servlet = new File(packageDir, 'SpringBootTestServlet.java') - servlet.delete() - - File ui = new File(packageDir, 'SpringBootTestUI.java') - ui.delete() - - File appUI = new File(packageDir, 'MyAppUI.java') - appUI.text = getClass().getResource('/templates/SpringBootUI.java.template').text - - File app = new File(packageDir, 'SpringBootApplication.java') - app.text = getClass().getResource('/templates/SpringBootApplication.java.template').text - + runWithArguments(CreateProjectTask.NAME, '--package=com.example.springboottest', '--name=MyApp') if(springBoot1){ - buildFile << "springBoot.mainClass = 'com.example.springboottest.SpringBootApplication'\n" + buildFile << "springBoot.mainClass = 'com.example.springboottest.MyAppApplication'\n" } else { - buildFile << "bootJar.mainClassName = 'com.example.springboottest.SpringBootApplication'\n" + buildFile << "bootJar.mainClassName = 'com.example.springboottest.MyAppApplication'\n" } } private boolean isSpringBoot1() { springBootVersion.startsWith("1") } -} +} \ No newline at end of file diff --git a/src/functionalTest/groovy/com/devsoap/plugin/tests/TaskConfigurationsTest.groovy b/src/functionalTest/groovy/com/devsoap/plugin/tests/TaskConfigurationsTest.groovy index dec64577..6e8fd05a 100644 --- a/src/functionalTest/groovy/com/devsoap/plugin/tests/TaskConfigurationsTest.groovy +++ b/src/functionalTest/groovy/com/devsoap/plugin/tests/TaskConfigurationsTest.groovy @@ -148,9 +148,9 @@ class TaskConfigurationsTest extends IntegrationTest { def module = project.idea.module println 'Module and Project name is equal ' + (project.name == module.name) println 'Output dir is classes dir ' + - (project.sourceSets.main.output.classesDir == module.outputDir) + (project.sourceSets.main.java.outputDir == module.outputDir) println 'Test output dir is classes dir ' + - (project.sourceSets.test.output.classesDir == module.testOutputDir) + (project.sourceSets.test.java.outputDir == module.testOutputDir) println 'Download Javadoc ' + module.downloadJavadoc println 'Download Sources ' + module.downloadSources diff --git a/src/main/groovy/com/devsoap/plugin/extensions/AddonExtension.groovy b/src/main/groovy/com/devsoap/plugin/extensions/AddonExtension.groovy index 8f26ad76..2ab1e296 100644 --- a/src/main/groovy/com/devsoap/plugin/extensions/AddonExtension.groovy +++ b/src/main/groovy/com/devsoap/plugin/extensions/AddonExtension.groovy @@ -16,6 +16,7 @@ package com.devsoap.plugin.extensions import org.gradle.api.Project +import org.gradle.api.provider.ListProperty import org.gradle.api.provider.Property import org.gradle.api.provider.Provider @@ -32,13 +33,13 @@ class AddonExtension { private final Property author private final Property license private final Property title - private final Property> styles + private final ListProperty styles AddonExtension(Project project) { author = project.objects.property(String) license = project.objects.property(String) title = project.objects.property(String) - styles = project.objects.property(List) + styles = project.objects.listProperty(String) author.set('') license.set('')