Skip to content
This repository was archived by the owner on May 19, 2019. It is now read-only.

Commit b1f74df

Browse files
author
R. Tyler Croy
committed
Add boilerplate gradle file
1 parent c62ba43 commit b1f74df

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.gradle
22
build/
3+
*.sw*

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
jruby-gradle-jar-plugin
22
=======================
33

4-
[![Gitter chat](https://badges.gitter.im/jruby-gradle/jruby-gradle-plugin.png)](https://gitter.im/jruby-gradle/jruby-gradle-plugin)
4+
[![Build Status](https://buildhive.cloudbees.com/job/jruby-gradle/job/jruby-gradle-jar-plugin/badge/icon)](https://buildhive.cloudbees.com/job/jruby-gradle/job/jruby-gradle-jar-plugin/) [![Gitter chat](https://badges.gitter.im/jruby-gradle/jruby-gradle-plugin.png)](https://gitter.im/jruby-gradle/jruby-gradle-plugin)
55

66
Plugin for creating JRuby-based java archives

build.gradle

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
apply plugin: 'groovy'
2+
apply plugin: 'maven'
3+
apply plugin: 'com.jfrog.bintray'
4+
5+
buildscript {
6+
repositories { jcenter() }
7+
dependencies { classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5' }
8+
}
9+
10+
group = 'com.github.jruby-gradle'
11+
version = '0.1.0'
12+
13+
if (System.env.RELEASE != '1') {
14+
version = "${version}-SNAPSHOT"
15+
}
16+
sourceCompatibility = '1.7'
17+
18+
repositories {
19+
jcenter()
20+
mavenLocal()
21+
}
22+
23+
dependencies {
24+
compile gradleApi()
25+
compile localGroovy()
26+
27+
testCompile ("org.spockframework:spock-core:0.7-groovy-${gradle.gradleVersion.startsWith('1.')?'1.8':'2.0'}") {
28+
exclude module : 'groovy-all'
29+
}
30+
}
31+
32+
test {
33+
testLogging {
34+
showStandardStreams = true
35+
exceptionFormat "full"
36+
}
37+
}
38+
39+
task sourcesJar(type: Jar, dependsOn: classes) {
40+
classifier = 'sources'
41+
from sourceSets.main.allSource
42+
}
43+
44+
artifacts {
45+
archives sourcesJar
46+
}
47+
48+
// Ensure we don't fail in CI or on a system without these values set in
49+
// ~/.gradle/gradle.properties
50+
if (!hasProperty( 'bintrayUser' ))
51+
ext.bintrayUser = ''
52+
53+
if (!hasProperty( 'bintrayKey' ))
54+
ext.bintrayKey = ''
55+
56+
bintray {
57+
user = project.bintrayUser
58+
key = project.bintrayKey
59+
publish = true
60+
dryRun = false
61+
configurations = ['archives']
62+
63+
pkg {
64+
userOrg = 'jruby-gradle'
65+
repo = 'plugins'
66+
name = 'jruby-gradle-jar-plugin'
67+
labels = ['jruby']
68+
69+
version {
70+
name = project.version
71+
vcsTag = "v${project.version}"
72+
attributes = ['gradle-plugin' : 'com.github.jruby-gradle:com.github.jruby-gradle:jruby-gradle-jar-plugin']
73+
desc = 'This plugin encapsulates java archive building functionality for JRuby Gradle projects'
74+
75+
}
76+
}
77+
}
78+
bintrayUpload.dependsOn assemble
79+
80+
// vim: ft=groovy

0 commit comments

Comments
 (0)