1
0
Fork 0
mirror of https://github.com/ethauvin/CompileOnlyPlugin.git synced 2025-04-24 16:37:10 -07:00

Added support for inclusion in the Grade Plugin Portal to build.gradle.

Added Gradle 2.1.x plugins DSL syntax to README.md
This commit is contained in:
Erik C. Thauvin 2016-06-26 14:39:06 -07:00
parent b4908d1de1
commit b1e7f53f98
2 changed files with 51 additions and 6 deletions

View file

@ -1,13 +1,13 @@
CompileOnlyPlugin
=================
Adds a _compileOnly_ configuration to a Java based gradle build.
Adds a _compileOnly_ configuration to a Java based Gradle build.
The plugin will also take care of registering the _compilyOnly_ dependencies to the matching scopes of IntelliJ Idea and Eclipse
Usage
-----
Add the following lines to your gradle build script
Add the following lines to your Gradle build script:
buildscript {
repositories {
@ -23,3 +23,13 @@ Add the following lines to your gradle build script
dependencies {
compileOnly <dependencies>
}
or if using Gradle 2.1 or higher:
plugins {
id 'com.coders-kitchen.compileonlyplugin' version '1.0.0'
}
dependencies {
compileOnly <dependencies>
}

View file

@ -1,15 +1,37 @@
import org.gradle.api.artifacts.maven.MavenDeployment
plugins {
id "java-gradle-plugin"
id "com.gradle.plugin-publish" version "0.9.4"
}
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'signing'
def mvnName = 'CompileOnlyPlugin'
def mvnUrl = 'http://coders-kitchen.github.com' // 404, maybe use https://github.com/coders-kitchen/CompileOnlyPlugin instead?
def mvnDescription = 'Adds a compile only configuration to the Java plugin of Gradle'
def pluginId = 'com.coders-kitchen.compileonlyplugin'
repositories {
jcenter()
}
dependencies {
compile gradleApi()
compile localGroovy()
}
gradlePlugin {
plugins {
compileOnlyPlugin {
id = pluginId
implementationClass = "com.coderskitchen.compileonly.CompileOnlyPlugin"
}
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
@ -32,7 +54,8 @@ artifacts {
archives sourcesJar
}
if (hasProperty('sonatypeUsername')) {
if (hasProperty('sonatypeUsername'))
{
signing {
sign configurations.archives
}
@ -47,10 +70,10 @@ if (hasProperty('sonatypeUsername')) {
}
pom {
project {
name 'CompileOnlyPlugin'
name mvnName
packaging 'jar'
description 'Adds a compile only configuration to the Java plugin of Gradle'
url 'http://coders-kitchen.github.com'
description mvnDescription
url mvnUrl
scm {
url 'scm:git@github:CodersKitchen/CompileOnlyPlugin.git'
@ -81,4 +104,16 @@ if (hasProperty('sonatypeUsername')) {
}
}
pluginBundle {
website = mvnUrl
vcsUrl = 'https://github.com/coders-kitchen/CompileOnlyPlugin'
description = mvnDescription
tags = ['compile', 'compileOnly', 'java']
plugins {
compileOnlyPlugin {
id = pluginId
displayName = mvnName
}
}
}