plugins { id 'groovy' id 'maven-publish' id 'java-gradle-plugin' id 'com.gradle.plugin-publish' version '0.20.0' id 'org.ajoberstar.git-publish' version '2.1.3' } apply from: "$rootProject.projectDir/gradle/integration-test.gradle" def compatibilityVersion = JavaVersion.VERSION_1_8 sourceCompatibility = compatibilityVersion targetCompatibility = compatibilityVersion group = 'com.bmuschko' version = '2.9.0' repositories { mavenCentral() } dependencies { def cargoVersion = '1.9.10' implementation "org.codehaus.cargo:cargo-daemon-client:$cargoVersion" testImplementation('org.spockframework:spock-core:1.3-groovy-2.4') { exclude group: 'org.codehaus.groovy' } testImplementation "org.codehaus.cargo:cargo-ant:$cargoVersion" } task sourcesJar(type: Jar) { archiveClassifier = 'sources' from sourceSets.main.allSource } task groovydocJar(type: Jar) { dependsOn groovydoc archiveClassifier = 'groovydoc' from groovydoc.destinationDir } task javadocJar(type: Jar) { dependsOn javadoc archiveClassifier = 'javadoc' from javadoc.destinationDir } artifacts { archives sourcesJar archives groovydocJar archives javadocJar } gradlePlugin { plugins { cargoBasePlugin { id = 'com.bmuschko.cargo-base' implementationClass = 'com.bmuschko.gradle.cargo.CargoBasePlugin' } cargoPlugin { id = 'com.bmuschko.cargo' implementationClass = 'com.bmuschko.gradle.cargo.CargoPlugin' } } } pluginBundle { website = "https://github.com/bmuschko/gradle-cargo-plugin" vcsUrl = "https://github.com/bmuschko/gradle-cargo-plugin" tags = ['deployment', 'container', 'web', 'ear', 'cargo'] mavenCoordinates { groupId = project.group.toString() artifactId = project.name version = project.version.toString() } plugins { cargoBasePlugin { displayName = 'Gradle Cargo Base Plugin' description = 'Plugin that provides Cargo custom task types, pre-configures classpath and deployables.' } cargoPlugin { displayName = 'Gradle Cargo Plugin' description = 'Plugin that provides a set of local and remote Cargo tasks and exposes extension for configuration.' } } } gitPublish { repoUri = 'git@github.com:bmuschko/gradle-cargo-plugin.git' branch = 'gh-pages' contents { from(javadoc.outputs.files) { into 'docs/javadoc' } from(groovydoc.outputs.files) { into 'docs/groovydoc' } } } gitPublishCopy.dependsOn javadoc, groovydoc