Skip to content

Commit f628ad2

Browse files
committed
build: move from maven to gradle
1 parent 56788a3 commit f628ad2

File tree

4 files changed

+169
-114
lines changed

4 files changed

+169
-114
lines changed

.editorconfig

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
4+
# top-most EditorConfig file
5+
root = true
6+
7+
# Unix-style newlines with a newline ending every file
8+
[*]
9+
end_of_line = lf
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
tab_width = 2
13+
charset = utf-8
14+
15+
# 4 space indentation
16+
[*.py]
17+
indent_style = space
18+
indent_size = 4
19+
20+
# Tab indentation (no size specified)
21+
[Makefile]
22+
indent_style = tab
23+
24+
[build.gradle]
25+
indent_style = tab
26+
27+
# Matches the exact files either package.json or .travis.yml
28+
[{package.json,.travis.yml}]
29+
indent_style = space
30+
indent_size = 2
31+
32+
[**.js]
33+
indent_style = tab
34+
indent_size = 2
35+
; Path to the external file format
36+
; The default is taken from the lib folder inside the folder extension.
37+
path=~/.vim/bundle/js-beautify/js/lib/beautify.js
38+
; Javascript interpreter to be invoked by default 'node'
39+
bin=node
40+
41+
[**.json]
42+
indent_style = tab
43+
indent_size = 2
44+
45+
[**.jsx]
46+
e4x = true
47+
indent_style = tab
48+
indent_size = 2
49+
50+
[**.css]
51+
indent_style = tab
52+
indent_size = 2
53+
path=~/.vim/bundle/js-beautify/js/lib/beautify-css.js
54+
55+
[**.html]
56+
indent_style = tab
57+
indent_size = 2
58+
max_char = 78
59+
brace_style = expand
60+
; Using special comments
61+
; And such comments or apply only in global configuration
62+
; So it's best to avoid them
63+
;vim:path=~/.vim/bundle/js-beautify/js/lib/beautify-html.js
64+
;vim:max_char=78:brace_style=expand
65+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
.classpath
33
.project
44
.settings
5+
.gradle
56
target
67
bin
8+
build

build.gradle

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
plugins {
2+
id "java"
3+
id "maven-publish"
4+
id "eclipse"
5+
id "org.dm.bundle" version "0.8.2"
6+
id "nebula.provided-base" version "2.2.2"
7+
id "com.jfrog.bintray" version "1.6"
8+
}
9+
10+
group = "com.github.davidb"
11+
def description = "A reporter for metrics which announces measurements to an InfluxDB server."
12+
version = "git describe --always --dirty".execute().text.trim()
13+
println("version : '${version}'")
14+
15+
repositories {
16+
jcenter()
17+
}
18+
19+
dependencies {
20+
compile 'io.dropwizard.metrics:metrics-core:3.1.2'
21+
compile 'org.slf4j:slf4j-api:1.7.7'
22+
23+
testCompile 'junit:junit:4.12'
24+
testCompile 'org.hamcrest:hamcrest-all:1.3'
25+
testCompile 'org.easytesting:fest-assert-core:2.0M10'
26+
testCompile 'org.mockito:mockito-all:1.9.5'
27+
testCompile 'org.slf4j:slf4j-simple:1.7.7'
28+
}
29+
30+
sourceCompatibility = JavaVersion.VERSION_1_8
31+
targetCompatibility = JavaVersion.VERSION_1_8
32+
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
33+
34+
task sourcesJar(type: Jar) {
35+
from sourceSets.main.allSource
36+
classifier = 'sources'
37+
}
38+
39+
def pomConfig = {
40+
url "https://github.com/davidB/${project.name}"
41+
inceptionYear "2016"
42+
licenses {
43+
license {
44+
name "Public domain (CC0-1.0)"
45+
url "http://creativecommons.org/publicdomain/zero/1.0/"
46+
distribution "repo"
47+
}
48+
}
49+
developers {
50+
developer {
51+
id "davidB"
52+
name "David Bernard"
53+
}
54+
developer {
55+
id "McFoggy"
56+
name "Matthieu Brouillard"
57+
58+
}
59+
}
60+
}
61+
62+
publishing {
63+
publications {
64+
mavenStuff(MavenPublication) {
65+
from components.java
66+
artifact sourcesJar
67+
pom.withXml {
68+
def root = asNode()
69+
root.appendNode('description', description)
70+
root.children().last() + pomConfig
71+
}
72+
}
73+
}
74+
}
75+
bintray {
76+
user = bintray_user
77+
key = bintray_api_key
78+
79+
publications = ['mavenStuff'] //When uploading Maven-based publication files
80+
//dryRun = false //Whether to run this as dry-run, without deploying
81+
publish = true //If version should be auto published after an upload
82+
pkg {
83+
repo = 'maven'
84+
name = project.name
85+
desc = description
86+
websiteUrl = "https://github.com/davidB/${project.name}"
87+
issueTrackerUrl = "https://github.com/davidB/${project.name}/issues"
88+
vcsUrl = "https://github.com/davidB/${project.name}.git"
89+
licenses = ['CC0-1.0']
90+
publicDownloadNumbers = true
91+
version {
92+
name = project.version
93+
vcsTag = project.version
94+
//attributes = []
95+
//gpg {
96+
// sign = true //Determines whether to GPG sign the files. The default is false
97+
// passphrase = 'optional, the passphrase for GPG signing'
98+
//}
99+
}
100+
}
101+
}
102+

pom.xml

Lines changed: 0 additions & 114 deletions
This file was deleted.

0 commit comments

Comments
 (0)