1
0
Fork 0
mirror of https://github.com/ethauvin/CompileOnlyPlugin.git synced 2025-04-25 00:37:14 -07:00
CompileOnlyPlugin/build.gradle
Peter Daum 0646da0809 Released version 1.0.0 of the plugin.
It adds the java plugin automatically if the java or the groovy plugin is missing.

When the idea or eclipse plugin is used, it also adds the new dependencies to their provided scope
2013-08-12 23:38:13 +02:00

84 lines
1.7 KiB
Groovy

import org.gradle.api.artifacts.maven.MavenDeployment
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'signing'
dependencies {
compile gradleApi()
compile localGroovy()
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
archiveName = archiveName.toLowerCase()
}
jar {
archiveName = archiveName.toLowerCase()
}
task javadocJar(type: Jar, dependsOn: groovydoc) {
from 'build/docs/groovydoc'
classifier = 'javadoc'
archiveName = archiveName.toLowerCase()
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
if (hasProperty('sonatypeUsername')) {
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom {
project {
name 'CompileOnlyPlugin'
packaging 'jar'
description 'Adds a compile only configuration to the Java plugin of Gradle'
url 'http://coders-kitchen.github.com'
scm {
url 'scm:git@github:CodersKitchen/CompileOnlyPlugin.git'
connection 'scm:git@github:CodersKitchen/CompileOnlyPlugin.git'
developerConnection 'scm:git@github:CodersKitchen/CompileOnlyPlugin.git'
}
licenses {
license {
name 'The MIT License (MIT)'
url 'http://opensource.org/licenses/MIT'
distribution 'repo'
}
}
developers {
developer {
id 'peterdaum'
name 'Peter Daum'
}
}
}
artifactId = project.name.toLowerCase()
}
}
}
}
}