Skip to content

Commit

Permalink
Refactored to use the new plugin management plugin. Fixes #10.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjstehno committed Apr 9, 2015
1 parent 385a18e commit 52c4f08
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 53 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,24 @@ To add the plugin to your project, add the following to your `build.gradle` file

```groovy
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.stehno:gradle-natives:0.2.2'
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.stehno:gradle-natives:0.2.3"
}
}
apply plugin:'com.stehno.natives'
apply plugin: "com.stehno.natives"
```

Alternately, you can use the new plug definition block in Gradle 2.1 and beyond.

```groovy
plugins {
id 'com.stehno.natives' version '0.2.2'
id 'com.stehno.natives' version '0.2.3'
}
```

Expand Down
56 changes: 14 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@
*/

plugins {
id 'com.jfrog.bintray' version '1.1'
id 'com.gradle.plugin-publish' version '0.9.0'
}

apply plugin:'groovy'
apply plugin:'maven'
apply plugin:'maven-publish'

group='com.stehno'
version='0.2.2'
version='0.2.3'

// explicit requests were made to build under Java 7
sourceCompatibility = 7
targetCompatibility = 7

Expand All @@ -40,47 +39,20 @@ dependencies {
testCompile 'org.mockito:mockito-all:1.9.5'
}

task sourcesJar(type: Jar) {
description = 'Creates sources JAR.'
classifier = 'sources'

from project.sourceSets.main.allSource
}

artifacts {
archives jar
archives sourcesJar
}

publishing {
publications {
mavenJava(MavenPublication){
artifact jar
artifact sourcesJar
}
}
}

task wrapper( type:Wrapper) {
gradleVersion = '2.3'
}

// NOTE: run bintrayUpload and then go to web and publish.
// - ensure that the gradle-plugin attribute is on the version
bintray {
user = property('bintray-user')
key = property('bintray-key')
pluginBundle {
website = 'http://cjstehno.github.io/gradle-natives/'
vcsUrl = 'https://github.com/cjstehno/gradle-natives'
description = 'Gradle plugin to aid in managing native libraries associated with Java-based projects.'
tags = ['gradle', 'groovy', 'native']

publications = ['mavenJava']

pkg {
repo = 'public'
name = 'gradle-natives'
desc = 'Gradle plugin for managing native libraries associated with Java projects.'
licenses = ['Apache-2.0']
labels = ['gradle', 'groovy', 'native']
version {
attributes = [ 'gradle-plugin': 'com.stehno.natives:com.stehno:gradle-natives' ]
}
plugins {
greetingsPlugin {
id = 'com.stehno.natives'
displayName = 'Gradle-Natives Plugin'
}
}
}
}
3 changes: 0 additions & 3 deletions gradle.properties

This file was deleted.

0 comments on commit 52c4f08

Please sign in to comment.