// orphaned from the main build when this project moved
project(":$verifier-root:$gradle-plugin") {

	ext.messagingLibsDir ="$buildDir/messaging-libs"
	ext.contractVerifierGradlePluginLibsDir ="$buildDir/contractVerifier-gradle-plugin-libs"

	ext.testSystemProperties = [
			'contract-gradle-plugin-libs-dir': contractVerifierGradlePluginLibsDir,
			'messaging-libs-dir': messagingLibsDir
	]

	dependencies {
		compile project(":$verifier-root:$verifier-core")
		compile project(":$verifier-root:$verifier-converters")
		compile gradleApi()

		testCompile gradleTestKit()
		testCompile project(":$verifier-root:$verifier-testing-utils")
	}

	configurations {
		messagingLibs
		contractVerifierGradlePluginLibs
	}

	dependencies {

		messagingLibs project(":$verifier-root:$verifier-messaging-root:$verifier-integration")
		messagingLibs project(":$verifier-root:$verifier-messaging-root:$verifier-messaging-core")
		messagingLibs project(":$verifier-root:$verifier-testing-utils")
		messagingLibs 'org.codehaus.groovy:groovy-all:2.4.5'

		contractVerifierGradlePluginLibs project(":$verifier-root:$gradle-plugin")
	}

	test {
		systemProperties = testSystemProperties
	}

	task archiveMessagingLibsDependencies(type: Sync) {
		from configurations.messagingLibs.resolvedConfiguration.resolvedArtifacts.collect { it.file }
		into messagingLibsDir
	}

	task archiveContractVerifierGradlePluginLibsDependencies(type: Sync) {
		from configurations.contractVerifierGradlePluginLibs.resolvedConfiguration.resolvedArtifacts.collect { it.file }
		into contractVerifierGradlePluginLibsDir
	}

	// archive task needs to have jars ready
	archiveMessagingLibsDependencies.dependsOn project(":$verifier-root:$verifier-messaging-root:$verifier-integration").tasks.jar
	archiveContractVerifierGradlePluginLibsDependencies.dependsOn project(":$verifier-root:$gradle-plugin").tasks.jar

	test.dependsOn archiveMessagingLibsDependencies, archiveContractVerifierGradlePluginLibsDependencies

}
