diff --git a/drivers/jvm/build.gradle b/drivers/jvm/build.gradle index dcce9954..1e9deab6 100644 --- a/drivers/jvm/build.gradle +++ b/drivers/jvm/build.gradle @@ -1,124 +1,184 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.8.10' - id 'org.jetbrains.dokka' version '1.8.10' - id 'io.gitlab.arturbosch.detekt' version '1.22.0' - id 'maven-publish' - id 'signing' + id 'java-library' + id 'groovy' + id 'maven-publish' + id 'signing' + id 'au.com.dius.pact' version '4.5.4' + id 'com.google.protobuf' version '0.9.2' + id 'io.gitlab.arturbosch.detekt' version '1.22.0' + id 'org.jetbrains.kotlin.jvm' version '1.8.10' + id 'org.jetbrains.dokka' version '1.8.10' +} + +ext { + description = "Pact Plugin Driver core implementation" + gitSha = System.getenv("GIT_SHA") ?: '0' } repositories { - mavenCentral() + mavenCentral() } -subprojects { - apply plugin: 'java' - apply plugin: 'org.jetbrains.kotlin.jvm' - apply plugin: 'maven-publish' - apply plugin: 'signing' - apply plugin: 'org.jetbrains.dokka' +version = '0.3.3' +group = 'io.pact.plugin.driver' - repositories { - mavenCentral() - } +targetCompatibility = '11' +sourceCompatibility = '11' - version = '0.3.3' +dependencies { + detektPlugins("io.gitlab.arturbosch.detekt:detekt-rules-libraries:1.22.0") +// detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.22.0") // TODO: enable once formatting errors are fixed - targetCompatibility = '11' - sourceCompatibility = '11' + implementation "javax.annotation:javax.annotation-api:1.3.2" + implementation 'au.com.dius.pact.core:model:4.5.4' + implementation 'au.com.dius.pact.core:support:4.5.4' + implementation 'com.google.guava:guava:31.1-jre' + implementation 'com.vdurmont:semver4j:3.1.0' + implementation 'commons-codec:commons-codec:1.15' + implementation('io.github.microutils:kotlin-logging:3.0.5') { + exclude group: 'org.jetbrains.kotlin' + } + implementation 'io.grpc:grpc-netty:1.53.0' + implementation 'io.grpc:grpc-protobuf:1.53.0' + implementation 'io.grpc:grpc-stub:1.53.0' + implementation 'javax.json:javax.json-api:1.1.4' + implementation 'org.apache.commons:commons-lang3:3.12.0' + implementation 'org.apache.httpcomponents.client5:httpclient5-fluent:5.2.1' + implementation 'org.apache.tika:tika-core:2.7.0' + implementation 'org.glassfish:javax.json:1.1.4' + implementation 'org.jetbrains.kotlin:kotlin-reflect:1.8.10' + implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.10' + + protobuf files('../../proto/') + + // These two needs to be before other test dependencies + testImplementation 'org.apache.groovy:groovy:4.0.10' + testImplementation 'org.apache.groovy:groovy-json:4.0.10' + + testImplementation 'au.com.dius.pact.consumer:junit5:4.5.4' + testImplementation('au.com.dius.pact.consumer:groovy:4.5.4') { + transitive = false + } + testImplementation 'ch.qos.logback:logback-classic:1.4.6' + testImplementation 'net.bytebuddy:byte-buddy:1.14.2' + testImplementation 'org.hamcrest:hamcrest:2.2' + testImplementation 'org.json:json:20230227' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2' + testImplementation 'org.mockito:mockito-core:5.2.0' + testImplementation 'org.mockito:mockito-junit-jupiter:5.2.0' + testImplementation 'org.objenesis:objenesis:3.3' + testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0' - jar { + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2' +} + +jar { manifest { - attributes provider: 'gradle', - 'Implementation-Title': project.name, 'Implementation-Version': archiveVersion, - 'Implementation-Vendor': project.group, 'Implementation-Vendor-Id': project.group, - 'Specification-Vendor': project.group, - 'Specification-Title': project.name, - 'Specification-Version': archiveVersion, - 'Automatic-Module-Name': project.group + "." + project.name.replaceAll('-', '_') + attributes provider: 'gradle', + 'Implementation-Title': project.name, 'Implementation-Version': archiveVersion, + 'Implementation-Vendor': project.group, 'Implementation-Vendor-Id': project.group, + 'Specification-Vendor': project.group, + 'Specification-Title': project.name, + 'Specification-Version': archiveVersion, + 'Automatic-Module-Name': project.group + "." + project.name.replaceAll('-', '_') } - } +} - task javadocJar(type: Jar, dependsOn: [javadoc, dokkaJavadoc]) { +tasks.register('javadocJar', Jar) { + dependsOn dokkaJavadoc + from dokkaJavadoc.outputDirectory archiveClassifier = 'javadoc' - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from javadoc.destinationDir, dokkaJavadoc.outputDirectory - } - - tasks.register('sourceJar', Jar) { - archiveClassifier = 'sources' - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from sourceSets.main.allSource - } - - tasks.withType(KotlinCompile).configureEach { - kotlinOptions { - jvmTarget = "11" - } - } +} + +java { + withJavadocJar() + withSourcesJar() +} - test { +test { + dependsOn jar useJUnitPlatform() - } - publishing { + // Set the load plugin timeout to 30 seconds for Windows + systemProperty('pact.plugin.loadTimeoutInMs', '30000') +} + +protobuf { + protoc { artifact = "com.google.protobuf:protoc:3.21.12" } + plugins { + grpc { artifact = "io.grpc:protoc-gen-grpc-java:1.53.0" } + } + generateProtoTasks { + all()*.plugins { grpc {} } + } +} + +pact { + publish { + pactBrokerUrl = 'https://pact-foundation.pactflow.io' + consumerVersion = "${project.version}+${gitSha}" + if (project.hasProperty('pactBrokerToken')) { + pactBrokerToken = project.pactBrokerToken + } + } +} + +publishing { publications { - mavenPublication(MavenPublication) { - from components.java - artifact sourceJar - artifact javadocJar - pom { - name = project.name - description = 'Pact Plugin Driver implementation' - url = 'https://github.com/pact-foundation/pact-plugins' - licenses { - license { - name = 'MIT' - url = 'https://github.com/pact-foundation/pact-plugins/blob/main/LICENSE' - distribution = 'repo' - } - } - scm { - url = 'https://github.com/pact-foundation/pact-plugins' - connection = 'git://github.com/pact-foundation/pact-plugins.git' - } - - developers { - developer { - id = 'mfellows' - name = 'Matt Fellows' - email = 'mfellows@dius.com.au' - } - developer { - id = 'rholshausen' - name = 'Ronald Holshausen' - email = 'rholshausen@dius.com.au' + mavenPublication(MavenPublication) { + from(components["java"]) + pom { + name = project.name + description = 'Pact Plugin Driver implementation' + url = 'https://github.com/pact-foundation/pact-plugins' + licenses { + license { + name = 'MIT' + url = 'https://github.com/pact-foundation/pact-plugins/blob/main/LICENSE' + distribution = 'repo' + } + } + scm { + url = 'https://github.com/pact-foundation/pact-plugins' + connection = 'git://github.com/pact-foundation/pact-plugins.git' + } + + developers { + developer { + id = 'mfellows' + name = 'Matt Fellows' + email = 'mfellows@dius.com.au' + } + developer { + id = 'rholshausen' + name = 'Ronald Holshausen' + email = 'rholshausen@dius.com.au' + } + } } - } } - } } repositories { - maven { - url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" - if (project.hasProperty('sonatypeUsername')) { - credentials { - username sonatypeUsername - password sonatypePassword - } + maven { + url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2' + if (project.hasProperty('sonatypeUsername')) { + credentials { + username sonatypeUsername + password sonatypePassword + } + } } - } } - } +} - signing { +signing { required { project.hasProperty('isRelease') } sign publishing.publications.mavenPublication - } +} - detekt { +detekt { config = files(rootProject.file("config/detekt-config.yml")) - } } + diff --git a/drivers/jvm/config/detekt-config.yml b/drivers/jvm/config/detekt-config.yml old mode 100755 new mode 100644 index d91b4e00..31d433a6 --- a/drivers/jvm/config/detekt-config.yml +++ b/drivers/jvm/config/detekt-config.yml @@ -1,9 +1,9 @@ build: maxIssues: 25 excludeCorrectable: false -# weights: -# complexity: 2 -# LongParameterList: 1 + # weights: + # complexity: 2 + # LongParameterList: 1 # style: 1 # comments: 1 @@ -16,11 +16,18 @@ processors: active: true exclude: - 'DetektProgressListener' + # - 'KtFileCountProcessor' + # - 'PackageCountProcessor' + # - 'ClassCountProcessor' # - 'FunctionCountProcessor' # - 'PropertyCountProcessor' - # - 'ClassCountProcessor' - # - 'PackageCountProcessor' - # - 'KtFileCountProcessor' + # - 'ProjectComplexityProcessor' + # - 'ProjectCognitiveComplexityProcessor' + # - 'ProjectLLOCProcessor' + # - 'ProjectCLOCProcessor' + # - 'ProjectLOCProcessor' + # - 'ProjectSLOCProcessor' + # - 'LicenseHeaderLoaderExtension' console-reports: active: true @@ -28,35 +35,64 @@ console-reports: - 'ProjectStatisticsReport' - 'ComplexityReport' - 'NotificationReport' - # - 'FindingsReport' + # - 'FindingsReport' - 'FileBasedFindingsReport' + # - 'LiteFindingsReport' + +output-reports: + active: true + exclude: + # - 'TxtOutputReport' + # - 'XmlOutputReport' + # - 'HtmlOutputReport' + # - 'MdOutputReport' comments: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' + excludes: [ '**/test/**','**/androidTest/**','**/*.Test.kt','**/*.Spec.kt','**/*.Spek.kt' ] AbsentOrWrongFileLicense: active: false licenseTemplateFile: 'license.template' + licenseTemplateIsRegex: false CommentOverPrivateFunction: active: false CommentOverPrivateProperty: active: false + DeprecatedBlockTag: + active: false EndOfSentenceFormat: active: false endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)' + KDocReferencesNonPublicProperty: + active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + OutdatedDocumentation: + active: false + matchTypeParameters: true + matchDeclarationsOrder: true + allowParamOnConstructorProperties: false UndocumentedPublicClass: active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] searchInNestedClass: true searchInInnerClass: true searchInInnerObject: true searchInInnerInterface: true + searchInProtectedClass: false UndocumentedPublicFunction: active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + searchProtectedFunction: false UndocumentedPublicProperty: active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + searchProtectedProperty: false complexity: active: true + CognitiveComplexMethod: + active: false + threshold: 15 ComplexCondition: active: true threshold: 4 @@ -65,16 +101,26 @@ complexity: threshold: 10 includeStaticDeclarations: false includePrivateDeclarations: false - ComplexMethod: + ignoreOverloaded: false + CyclomaticComplexMethod: active: true threshold: 15 ignoreSingleWhenExpression: false ignoreSimpleWhenEntries: false ignoreNestingFunctions: false - nestingFunctions: run,let,apply,with,also,use,forEach,isNotNull,ifNull + nestingFunctions: + - 'also' + - 'apply' + - 'forEach' + - 'isNotNull' + - 'ifNull' + - 'let' + - 'run' + - 'use' + - 'with' LabeledExpression: active: false - ignoredLabels: '' + ignoredLabels: [ ] LargeClass: active: true threshold: 600 @@ -87,26 +133,41 @@ complexity: constructorThreshold: 7 ignoreDefaultParameters: false ignoreDataClasses: true -# ignoreAnnotated: '' + ignoreAnnotatedParameter: [ ] MethodOverloading: active: false threshold: 6 + NamedArguments: + active: false + threshold: 3 + ignoreArgumentsMatchingNames: false NestedBlockDepth: active: true - threshold: 5 + threshold: 4 + NestedScopeFunctions: + active: false + threshold: 1 + functions: + - 'kotlin.apply' + - 'kotlin.run' + - 'kotlin.with' + - 'kotlin.let' + - 'kotlin.also' + ReplaceSafeCallChainWithRun: + active: false StringLiteralDuplication: active: false - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] threshold: 3 ignoreAnnotation: true excludeStringsWithLessThan5Characters: true ignoreStringsRegex: '$^' TooManyFunctions: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] thresholdInFiles: 11 - thresholdInClasses: 20 - thresholdInInterfaces: 20 + thresholdInClasses: 11 + thresholdInInterfaces: 11 thresholdInObjects: 11 thresholdInEnums: 11 ignoreDeprecated: false @@ -117,14 +178,26 @@ coroutines: active: true GlobalCoroutineUsage: active: false + InjectDispatcher: + active: true + dispatcherNames: + - 'IO' + - 'Default' + - 'Unconfined' RedundantSuspendModifier: + active: true + SleepInsteadOfDelay: + active: true + SuspendFunWithCoroutineScopeReceiver: active: false + SuspendFunWithFlowReturnType: + active: true empty-blocks: active: true EmptyCatchBlock: active: true - allowedExceptionNameRegex: '^(_|(ignore|expected).*)' + allowedExceptionNameRegex: '_|(ignore|expected).*' EmptyClassBlock: active: true EmptyDefaultConstructor: @@ -159,12 +232,18 @@ exceptions: active: true ExceptionRaisedInUnexpectedLocation: active: false - methodNames: 'toString,hashCode,equals,finalize' + methodNames: + - 'equals' + - 'finalize' + - 'hashCode' + - 'toString' InstanceOfCheckForException: - active: false - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' + active: true + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] NotImplementedDeclaration: active: false + ObjectExtendsThrowable: + active: false PrintStackTrace: active: false RethrowCaughtException: @@ -174,224 +253,242 @@ exceptions: ignoreLabeled: false SwallowedException: active: false - ignoredExceptionTypes: 'InterruptedException,NumberFormatException,ParseException,MalformedURLException' - allowedExceptionNameRegex: '^(_|(ignore|expected).*)' + ignoredExceptionTypes: + - 'InterruptedException' + - 'MalformedURLException' + - 'NumberFormatException' + - 'ParseException' + allowedExceptionNameRegex: '_|(ignore|expected).*' ThrowingExceptionFromFinally: active: false ThrowingExceptionInMain: active: false ThrowingExceptionsWithoutMessageOrCause: active: false - exceptions: 'IllegalArgumentException,IllegalStateException,IOException' + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + exceptions: + - 'ArrayIndexOutOfBoundsException' + - 'Exception' + - 'IllegalArgumentException' + - 'IllegalMonitorStateException' + - 'IllegalStateException' + - 'IndexOutOfBoundsException' + - 'NullPointerException' + - 'RuntimeException' + - 'Throwable' ThrowingNewInstanceOfSameException: active: false TooGenericExceptionCaught: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] exceptionNames: - - ArrayIndexOutOfBoundsException - - Error - - Exception - - IllegalMonitorStateException - - NullPointerException - - IndexOutOfBoundsException - - RuntimeException - - Throwable - allowedExceptionNameRegex: '^(_|(ignore|expected).*)' + - 'ArrayIndexOutOfBoundsException' + - 'Error' + - 'Exception' + - 'IllegalMonitorStateException' + - 'IndexOutOfBoundsException' + - 'NullPointerException' + - 'RuntimeException' + - 'Throwable' + allowedExceptionNameRegex: '_|(ignore|expected).*' TooGenericExceptionThrown: active: true exceptionNames: - - Error - - Exception - - Throwable - - RuntimeException + - 'Error' + - 'Exception' + - 'RuntimeException' + - 'Throwable' -formatting: - active: true - android: false - autoCorrect: true - AnnotationOnSeparateLine: - active: false - autoCorrect: true - ChainWrapping: - active: true - autoCorrect: true - CommentSpacing: - active: true - autoCorrect: true - EnumEntryNameCase: - active: false - autoCorrect: true - Filename: - active: true - FinalNewline: - active: true - autoCorrect: true - insertFinalNewLine: true - ImportOrdering: - active: false - autoCorrect: true - Indentation: - active: false - autoCorrect: true - indentSize: 4 - continuationIndentSize: 4 - MaximumLineLength: - active: true - maxLineLength: 120 - ModifierOrdering: - active: true - autoCorrect: true - MultiLineIfElse: - active: true - autoCorrect: true - NoBlankLineBeforeRbrace: - active: true - autoCorrect: true - NoConsecutiveBlankLines: - active: true - autoCorrect: true - NoEmptyClassBody: - active: true - autoCorrect: true - NoEmptyFirstLineInMethodBlock: +#formatting: +# active: true +# android: false +# autoCorrect: true +# AnnotationOnSeparateLine: +# active: false +# autoCorrect: true +# ChainWrapping: +# active: true +# autoCorrect: true +# CommentSpacing: +# active: true +# autoCorrect: true +# EnumEntryNameCase: +# active: false +# autoCorrect: true +# Filename: +# active: true +# FinalNewline: +# active: true +# autoCorrect: true +# insertFinalNewLine: true +# ImportOrdering: +# active: false +# autoCorrect: true +# Indentation: +# active: false +# autoCorrect: true +# indentSize: 4 +# MaximumLineLength: +# active: true +# maxLineLength: 120 +# ModifierOrdering: +# active: true +# autoCorrect: true +# MultiLineIfElse: +# active: true +# autoCorrect: true +# NoBlankLineBeforeRbrace: +# active: true +# autoCorrect: true +# NoConsecutiveBlankLines: +# active: true +# autoCorrect: true +# NoEmptyClassBody: +# active: true +# autoCorrect: true +# NoEmptyFirstLineInMethodBlock: +# active: false +# autoCorrect: true +# NoLineBreakAfterElse: +# active: true +# autoCorrect: true +# NoLineBreakBeforeAssignment: +# active: true +# autoCorrect: true +# NoMultipleSpaces: +# active: true +# autoCorrect: true +# NoSemicolons: +# active: true +# autoCorrect: true +# NoTrailingSpaces: +# active: true +# autoCorrect: true +# NoUnitReturn: +# active: true +# autoCorrect: true +# NoUnusedImports: +# active: true +# autoCorrect: true +# NoWildcardImports: +# active: true +# PackageName: +# active: true +# autoCorrect: true +# ParameterListWrapping: +# active: true +# autoCorrect: true +# SpacingAroundColon: +# active: true +# autoCorrect: true +# SpacingAroundComma: +# active: true +# autoCorrect: true +# SpacingAroundCurly: +# active: true +# autoCorrect: true +# SpacingAroundDot: +# active: true +# autoCorrect: true +# SpacingAroundKeyword: +# active: true +# autoCorrect: true +# SpacingAroundOperators: +# active: true +# autoCorrect: true +# SpacingAroundParens: +# active: true +# autoCorrect: true +# SpacingAroundRangeOperator: +# active: true +# autoCorrect: true +# StringTemplate: +# active: true +# autoCorrect: true + +libraries: + ForbiddenPublicDataClass: active: false - autoCorrect: true - NoLineBreakAfterElse: - active: true - autoCorrect: true - NoLineBreakBeforeAssignment: - active: true - autoCorrect: true - NoMultipleSpaces: - active: true - autoCorrect: true - NoSemicolons: - active: true - autoCorrect: true - NoTrailingSpaces: - active: true - autoCorrect: true - NoUnitReturn: - active: true - autoCorrect: true - NoUnusedImports: - active: true - autoCorrect: true - NoWildcardImports: - active: true - PackageName: - active: true - autoCorrect: true - ParameterListWrapping: - active: true - autoCorrect: true - indentSize: 4 - SpacingAroundColon: - active: true - autoCorrect: true - SpacingAroundComma: - active: true - autoCorrect: true - SpacingAroundCurly: - active: true - autoCorrect: true - SpacingAroundDot: - active: true - autoCorrect: true - SpacingAroundKeyword: - active: true - autoCorrect: true - SpacingAroundOperators: - active: true - autoCorrect: true - SpacingAroundParens: - active: true - autoCorrect: true - SpacingAroundRangeOperator: - active: true - autoCorrect: true - StringTemplate: + ignorePackages: ['*.internal','*.internal.*'] + LibraryCodeMustSpecifyReturnType: active: true - autoCorrect: true naming: active: true + BooleanPropertyNaming: + active: false + allowedPattern: '^(is|has|are)' + ignoreOverridden: true ClassNaming: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' - classPattern: '[A-Z$][a-zA-Z0-9$]*' + classPattern: '[A-Z][a-zA-Z0-9]*' ConstructorParameterNaming: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' parameterPattern: '[a-z][A-Za-z0-9]*' privateParameterPattern: '[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' ignoreOverridden: true EnumNaming: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' - enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*' + enumEntryPattern: '[A-Z][_a-zA-Z0-9]*' ForbiddenClassName: active: false - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' - forbiddenName: '' + forbiddenName: [ ] FunctionMaxLength: active: false - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' maximumFunctionNameLength: 30 FunctionMinLength: active: false - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' minimumFunctionNameLength: 3 FunctionNaming: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$' excludeClassPattern: '$^' ignoreOverridden: true FunctionParameterNaming: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' parameterPattern: '[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' ignoreOverridden: true InvalidPackageDeclaration: active: false rootPackage: '' + requireRootInDeclaration: false + LambdaParameterNaming: + active: false + parameterPattern: '[a-z][A-Za-z0-9]*|_' MatchingDeclarationName: active: true mustBeFirst: true MemberNameEqualsClassName: active: true ignoreOverridden: true + NoNameShadowing: + active: true + NonBooleanPropertyPrefixedWithIs: + active: false ObjectPropertyNaming: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' constantPattern: '[A-Za-z][_A-Za-z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*' PackageNaming: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' - packagePattern: '^[a-z]+(\.[a-z][A-Za-z0-9]*)*$' + packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' TopLevelPropertyNaming: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' constantPattern: '[A-Z][_A-Z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' VariableMaxLength: active: false - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' maximumVariableNameLength: 64 VariableMinLength: active: false - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' minimumVariableNameLength: 1 VariableNaming: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' variablePattern: '[a-z][A-Za-z0-9]*' privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' @@ -401,31 +498,73 @@ performance: active: true ArrayPrimitive: active: true + CouldBeSequence: + active: false + threshold: 3 ForEachOnRange: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] SpreadOperator: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + UnnecessaryPartOfBinaryExpression: + active: false UnnecessaryTemporaryInstantiation: active: true potential-bugs: active: true + AvoidReferentialEquality: + active: true + forbiddenTypePatterns: + - 'kotlin.String' + CastToNullableType: + active: false Deprecation: active: false - DuplicateCaseInWhenExpression: + DontDowncastCollectionTypes: + active: false + DoubleMutabilityForCollection: active: true + mutableTypes: + - 'kotlin.collections.MutableList' + - 'kotlin.collections.MutableMap' + - 'kotlin.collections.MutableSet' + - 'java.util.ArrayList' + - 'java.util.LinkedHashSet' + - 'java.util.HashSet' + - 'java.util.LinkedHashMap' + - 'java.util.HashMap' + ElseCaseInsteadOfExhaustiveWhen: + active: false EqualsAlwaysReturnsTrueOrFalse: active: true EqualsWithHashCodeExist: active: true + ExitOutsideMain: + active: false ExplicitGarbageCollectionCall: active: true HasPlatformType: - active: false + active: true + IgnoredReturnValue: + active: true + restrictToConfig: true + returnValueAnnotations: + - '*.CheckResult' + - '*.CheckReturnValue' + ignoreReturnValueAnnotations: + - '*.CanIgnoreReturnValue' + returnValueTypes: + - 'kotlin.sequences.Sequence' + - 'kotlinx.coroutines.flow.*Flow' + - 'java.util.stream.*Stream' + ignoreFunctionCall: [ ] ImplicitDefaultLocale: + active: true + ImplicitUnitReturnType: active: false + allowExplicitReturnType: true InvalidRange: active: true IteratorHasNextCallsNextMethod: @@ -434,27 +573,36 @@ potential-bugs: active: true LateinitUsage: active: false - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' - excludeAnnotatedProperties: '' + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] ignoreOnClassesPattern: '' MapGetWithNotNullAssertionOperator: - active: false - MissingWhenCase: - active: true - RedundantElseInWhen: active: true + MissingPackageDeclaration: + active: false + excludes: [ '**/*.kts' ] + NullCheckOnMutableProperty: + active: false + NullableToStringCall: + active: false UnconditionalJumpStatementInLoop: active: false -# UnnecessaryNotNullOperator: -# active: false -# UnnecessarySafeCall: -# active: false + UnnecessaryNotNullCheck: + active: false + UnnecessaryNotNullOperator: + active: true + UnnecessarySafeCall: + active: true + UnreachableCatchBlock: + active: true UnreachableCode: active: true UnsafeCallOnNullableType: active: true + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] UnsafeCast: active: false + UnusedUnaryOperator: + active: true UselessPostfixExpression: active: false WrongEqualsTypeParameter: @@ -462,13 +610,26 @@ potential-bugs: style: active: true + AlsoCouldBeApply: + active: false + CanBeNonNullable: + active: false + CascadingCallWrapping: + active: false + includeElvis: true + ClassOrdering: + active: false CollapsibleIfStatements: active: false DataClassContainsFunctions: active: false - conversionFunctionPrefix: 'to' + conversionFunctionPrefix: + - 'to' DataClassShouldBeImmutable: active: false + DestructuringDeclarationWithTooManyEntries: + active: true + maxDestructuringEntries: 3 EqualsNullCall: active: true EqualsOnSignatureLine: @@ -482,18 +643,26 @@ style: includeLineWrapping: false ForbiddenComment: active: true - values: 'TODO:,FIXME:,STOPSHIP:' + values: + - 'FIXME:' + - 'STOPSHIP:' + - 'TODO:' allowedPatterns: '' + customMessage: '' ForbiddenImport: active: false - imports: [] + imports: [ ] forbiddenPatterns: '' ForbiddenMethodCall: active: false - methods: '' - ForbiddenPublicDataClass: + methods: + - reason: 'print does not allow you to configure the output stream. Use a logger instead.' + value: 'kotlin.io.print' + - reason: 'println does not allow you to configure the output stream. Use a logger instead.' + value: 'kotlin.io.println' + ForbiddenSuppress: active: false - ignorePackages: '*.internal,*.internal.*' + rules: [ ] ForbiddenVoid: active: false ignoreOverridden: false @@ -501,17 +670,20 @@ style: FunctionOnlyReturningConstant: active: true ignoreOverridableFunction: true - excludedFunctions: 'describeContents' - excludeAnnotatedFunction: 'dagger.Provides' - LibraryCodeMustSpecifyReturnType: - active: true + ignoreActualFunction: true + excludedFunctions: [ 'describeContents' ] + ignoreAnnotated: [ 'dagger.Provides' ] LoopWithTooManyJumpStatements: active: true maxJumpCount: 1 MagicNumber: active: false - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' - ignoreNumbers: '-1,0,1,2' + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts' ] + ignoreNumbers: + - '-1' + - '0' + - '1' + - '2' ignoreHashCodeFunction: true ignorePropertyDeclaration: false ignoreLocalVariableDeclaration: false @@ -521,24 +693,40 @@ style: ignoreNamedArgument: true ignoreEnums: false ignoreRanges: false + ignoreExtensionFunctions: true MandatoryBracesIfStatements: active: false + MandatoryBracesLoops: + active: false + MaxChainedCallsOnSameLine: + active: false + maxChainedCalls: 5 MaxLineLength: active: true maxLineLength: 120 excludePackageStatements: true excludeImportStatements: true excludeCommentStatements: false + excludeRawStrings: true MayBeConst: active: true ModifierOrder: active: true + MultilineLambdaItParameter: + active: false + MultilineRawStringIndentation: + active: false + indentSize: 4 NestedClassesVisibility: active: false NewLineAtEndOfFile: active: true NoTabs: active: false + NullableBooleanCheck: + active: false + ObjectLiteralToLambda: + active: true OptionalAbstractKeyword: active: true OptionalUnit: @@ -551,12 +739,15 @@ style: active: true RedundantExplicitType: active: false + RedundantHigherOrderMapUsage: + active: true RedundantVisibilityModifierRule: active: false ReturnCount: active: true max: 2 - excludedFunctions: 'equals' + excludedFunctions: + - 'equals' excludeLabeled: false excludeReturnFromLambda: true excludeGuardClauses: false @@ -569,24 +760,34 @@ style: ThrowsCount: active: true max: 2 + excludeGuardClauses: false TrailingWhitespace: active: false + TrimMultilineRawString: + active: false UnderscoresInNumericLiterals: active: false - acceptableDecimalLength: 5 + acceptableLength: 4 + allowNonStandardGrouping: false UnnecessaryAbstractClass: active: true - excludeAnnotatedClasses: 'dagger.Module' UnnecessaryAnnotationUseSiteTarget: active: false UnnecessaryApply: + active: true + UnnecessaryBackticks: active: false + UnnecessaryFilter: + active: true UnnecessaryInheritance: active: true + UnnecessaryInnerClass: + active: false UnnecessaryLet: active: false UnnecessaryParentheses: active: false + allowForUnclearPrecedence: false UntilInsteadOfRangeTo: active: false UnusedImports: @@ -596,17 +797,32 @@ style: UnusedPrivateMember: active: false allowedNames: '(_|ignored|expected|serialVersionUID)' + UseAnyOrNoneInsteadOfFind: + active: true UseArrayLiteralsInAnnotations: active: false + UseCheckNotNull: + active: true UseCheckOrError: active: false UseDataClass: active: false - excludeAnnotatedClasses: '' allowVars: false + UseEmptyCounterpart: + active: false + UseIfEmptyOrIfBlank: + active: false UseIfInsteadOfWhen: active: false + UseIsNullOrEmpty: + active: true + UseOrEmpty: + active: true UseRequire: + active: true + UseRequireNotNull: + active: true + UseSumOfInsteadOfFlatMapSize: active: false UselessCallOnNotNull: active: true @@ -614,7 +830,10 @@ style: active: true VarCouldBeVal: active: false + ignoreLateinitVar: false WildcardImport: active: true - excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt' - excludeImports: 'java.util.*,kotlinx.android.synthetic.*' + excludes: [ '**/test/**','**/androidTest/**','**/*.Test.kt','**/*.Spec.kt','**/*.Spek.kt' ] + excludeImports: + - 'java.util.*' + - 'kotlinx.android.synthetic.*' diff --git a/drivers/jvm/core/build.gradle b/drivers/jvm/core/build.gradle deleted file mode 100644 index d6c17a44..00000000 --- a/drivers/jvm/core/build.gradle +++ /dev/null @@ -1,88 +0,0 @@ -plugins { - id 'java-library' - id 'com.google.protobuf' version '0.9.2' - id 'groovy' - id 'au.com.dius.pact' version '4.5.4' -} - -ext { - description = "Pact Plugin Driver core implementation" - gitSha = System.getenv("GIT_SHA") ?: '0' -} - -dependencies { - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.10' - implementation 'org.jetbrains.kotlin:kotlin-reflect:1.8.10' - implementation 'com.vdurmont:semver4j:3.1.0' - implementation 'io.grpc:grpc-protobuf:1.53.0' - implementation 'io.grpc:grpc-stub:1.53.0' - implementation 'io.grpc:grpc-netty:1.53.0' - implementation "javax.annotation:javax.annotation-api:1.3.2" - implementation 'com.google.guava:guava:31.1-jre' - implementation('io.github.microutils:kotlin-logging:3.0.5') { - exclude group: 'org.jetbrains.kotlin' - } - implementation 'javax.json:javax.json-api:1.1.4' - implementation 'org.glassfish:javax.json:1.1.4' - implementation 'commons-codec:commons-codec:1.15' - implementation 'org.apache.commons:commons-lang3:3.12.0' - implementation 'au.com.dius.pact.core:support:4.5.4' - implementation 'au.com.dius.pact.core:model:4.5.4' - implementation 'org.apache.tika:tika-core:2.7.0' - implementation 'org.apache.httpcomponents.client5:httpclient5-fluent:5.2.1' - implementation 'com.vdurmont:semver4j:3.1.0' - - protobuf files('../../../proto/') - - testImplementation 'org.apache.groovy:groovy:4.0.10' - testImplementation 'org.apache.groovy:groovy-json:4.0.10' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2' - testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.9.2' - testImplementation 'org.hamcrest:hamcrest:2.2' - testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0' - testImplementation 'net.bytebuddy:byte-buddy:1.14.2' - testImplementation 'org.objenesis:objenesis:3.3' - testImplementation 'au.com.dius.pact.consumer:junit5:4.5.4' - testImplementation('au.com.dius.pact.consumer:groovy:4.5.4') { - transitive = false - } - testImplementation 'ch.qos.logback:logback-classic:1.4.6' - testImplementation 'org.mockito:mockito-core:5.2.0' - testImplementation 'org.mockito:mockito-junit-jupiter:5.2.0' - testImplementation 'org.json:json:20230227' -} - -protobuf { - protoc { artifact = "com.google.protobuf:protoc:3.21.12" } - plugins { - grpc { artifact = "io.grpc:protoc-gen-grpc-java:1.53.0" } - } - generateProtoTasks { - all()*.plugins { grpc {} } - } -} - -sourceSets { - main { - java { - srcDirs 'build/generated/source/proto/main/grpc' - srcDirs 'build/generated/source/proto/main/java' - } - } -} - -test { - // Set the load plugin timeout to 30 seconds for Windows - systemProperty('pact.plugin.loadTimeoutInMs', '30000') -} - -pact { - publish { - pactBrokerUrl = 'https://pact-foundation.pactflow.io' - consumerVersion = "${project.version}+${gitSha}" - if (project.hasProperty('pactBrokerToken')) { - pactBrokerToken = project.pactBrokerToken - } - } -} diff --git a/drivers/jvm/release.groovy b/drivers/jvm/release.groovy index 1fcc4eab..330726b3 100755 --- a/drivers/jvm/release.groovy +++ b/drivers/jvm/release.groovy @@ -55,7 +55,7 @@ ask('Execute Build?: [Y]') { executeOnShell './gradlew clean build' } -def projectProps = './gradlew :core:properties'.execute().text.split('\n').inject([:]) { acc, v -> +def projectProps = './gradlew :properties'.execute().text.split('\n').inject([:]) { acc, v -> if (v ==~ /\w+: .*/) { def kv = v.split(':') acc[kv[0].trim()] = kv[1].trim() diff --git a/drivers/jvm/settings.gradle b/drivers/jvm/settings.gradle index d4854561..4d52ac57 100644 --- a/drivers/jvm/settings.gradle +++ b/drivers/jvm/settings.gradle @@ -1,2 +1 @@ -rootProject.name = 'io.pact.plugin.driver' -include('core') +rootProject.name = 'core' diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/CatalogueManager.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/CatalogueManager.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/CatalogueManager.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/CatalogueManager.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/ChildProcess.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/ChildProcess.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/ChildProcess.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/ChildProcess.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/ContentGenerator.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/ContentGenerator.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/ContentGenerator.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/ContentGenerator.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/ContentMatcher.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/ContentMatcher.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/ContentMatcher.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/ContentMatcher.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/InteractionVerification.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/InteractionVerification.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/InteractionVerification.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/InteractionVerification.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/Json.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/Json.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/Json.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/Json.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/Library.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/Library.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/Library.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/Library.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/MockServer.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/MockServer.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/MockServer.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/MockServer.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/PluginManager.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/PluginManager.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/PluginManager.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/PluginManager.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/PluginMetrics.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/PluginMetrics.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/PluginMetrics.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/PluginMetrics.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/SystemExec.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/SystemExec.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/SystemExec.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/SystemExec.kt diff --git a/drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/Util.kt b/drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/Util.kt similarity index 100% rename from drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/Util.kt rename to drivers/jvm/src/main/kotlin/io/pact/plugins/jvm/core/Util.kt diff --git a/drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/CatalogueManagerSpec.groovy b/drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/CatalogueManagerSpec.groovy similarity index 100% rename from drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/CatalogueManagerSpec.groovy rename to drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/CatalogueManagerSpec.groovy diff --git a/drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/DefaultPactPluginManifestSpec.groovy b/drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/DefaultPactPluginManifestSpec.groovy similarity index 100% rename from drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/DefaultPactPluginManifestSpec.groovy rename to drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/DefaultPactPluginManifestSpec.groovy diff --git a/drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/DefaultPactPluginSpec.groovy b/drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/DefaultPactPluginSpec.groovy similarity index 100% rename from drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/DefaultPactPluginSpec.groovy rename to drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/DefaultPactPluginSpec.groovy diff --git a/drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/DefaultPluginManagerSpec.groovy b/drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/DefaultPluginManagerSpec.groovy similarity index 100% rename from drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/DefaultPluginManagerSpec.groovy rename to drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/DefaultPluginManagerSpec.groovy diff --git a/drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/DriverPactTest.groovy b/drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/DriverPactTest.groovy similarity index 98% rename from drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/DriverPactTest.groovy rename to drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/DriverPactTest.groovy index 2db87b4c..b1b54df4 100644 --- a/drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/DriverPactTest.groovy +++ b/drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/DriverPactTest.groovy @@ -117,7 +117,7 @@ class DriverPactTest { .usingPlugin('protobuf') .expectsToReceive('init plugin request', 'core/interaction/synchronous-message') .with([ - 'pact:proto': PactBuilder.filePath("../../../proto/plugin.proto"), + 'pact:proto': PactBuilder.filePath("../../proto/plugin.proto"), 'pact:content-type': 'application/protobuf', 'pact:proto-service': 'PactPlugin/InitPlugin', 'request': [ diff --git a/drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/UtilsSpec.groovy b/drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/UtilsSpec.groovy similarity index 100% rename from drivers/jvm/core/src/test/groovy/io/pact/plugins/jvm/core/UtilsSpec.groovy rename to drivers/jvm/src/test/groovy/io/pact/plugins/jvm/core/UtilsSpec.groovy diff --git a/drivers/jvm/core/src/test/resources/logback-test.xml b/drivers/jvm/src/test/resources/logback-test.xml similarity index 75% rename from drivers/jvm/core/src/test/resources/logback-test.xml rename to drivers/jvm/src/test/resources/logback-test.xml index bafbaca1..0f7f352d 100644 --- a/drivers/jvm/core/src/test/resources/logback-test.xml +++ b/drivers/jvm/src/test/resources/logback-test.xml @@ -11,4 +11,7 @@ + + + diff --git a/drivers/jvm/core/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/drivers/jvm/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker similarity index 100% rename from drivers/jvm/core/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker rename to drivers/jvm/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker diff --git a/drivers/jvm/core/src/test/resources/pact-plugin.json b/drivers/jvm/src/test/resources/pact-plugin.json similarity index 100% rename from drivers/jvm/core/src/test/resources/pact-plugin.json rename to drivers/jvm/src/test/resources/pact-plugin.json