Skip to content

Commit

Permalink
build: move from maven to gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
davidB committed Mar 20, 2016
1 parent 56788a3 commit f628ad2
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 114 deletions.
65 changes: 65 additions & 0 deletions .editorconfig
@@ -0,0 +1,65 @@
# EditorConfig is awesome: http://EditorConfig.org


# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
tab_width = 2
charset = utf-8

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

[build.gradle]
indent_style = tab

# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2

[**.js]
indent_style = tab
indent_size = 2
; Path to the external file format
; The default is taken from the lib folder inside the folder extension.
path=~/.vim/bundle/js-beautify/js/lib/beautify.js
; Javascript interpreter to be invoked by default 'node'
bin=node

[**.json]
indent_style = tab
indent_size = 2

[**.jsx]
e4x = true
indent_style = tab
indent_size = 2

[**.css]
indent_style = tab
indent_size = 2
path=~/.vim/bundle/js-beautify/js/lib/beautify-css.js

[**.html]
indent_style = tab
indent_size = 2
max_char = 78
brace_style = expand
; Using special comments
; And such comments or apply only in global configuration
; So it's best to avoid them
;vim:path=~/.vim/bundle/js-beautify/js/lib/beautify-html.js
;vim:max_char=78:brace_style=expand

2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -2,5 +2,7 @@
.classpath
.project
.settings
.gradle
target
bin
build
102 changes: 102 additions & 0 deletions build.gradle
@@ -0,0 +1,102 @@
plugins {
id "java"
id "maven-publish"
id "eclipse"
id "org.dm.bundle" version "0.8.2"
id "nebula.provided-base" version "2.2.2"
id "com.jfrog.bintray" version "1.6"
}

group = "com.github.davidb"
def description = "A reporter for metrics which announces measurements to an InfluxDB server."
version = "git describe --always --dirty".execute().text.trim()
println("version : '${version}'")

repositories {
jcenter()
}

dependencies {
compile 'io.dropwizard.metrics:metrics-core:3.1.2'
compile 'org.slf4j:slf4j-api:1.7.7'

testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'org.easytesting:fest-assert-core:2.0M10'
testCompile 'org.mockito:mockito-all:1.9.5'
testCompile 'org.slf4j:slf4j-simple:1.7.7'
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

def pomConfig = {
url "https://github.com/davidB/${project.name}"
inceptionYear "2016"
licenses {
license {
name "Public domain (CC0-1.0)"
url "http://creativecommons.org/publicdomain/zero/1.0/"
distribution "repo"
}
}
developers {
developer {
id "davidB"
name "David Bernard"
}
developer {
id "McFoggy"
name "Matthieu Brouillard"
email "matthieu@brouillard.fr"
}
}
}

publishing {
publications {
mavenStuff(MavenPublication) {
from components.java
artifact sourcesJar
pom.withXml {
def root = asNode()
root.appendNode('description', description)
root.children().last() + pomConfig
}
}
}
}
bintray {
user = bintray_user
key = bintray_api_key

publications = ['mavenStuff'] //When uploading Maven-based publication files
//dryRun = false //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
pkg {
repo = 'maven'
name = project.name
desc = description
websiteUrl = "https://github.com/davidB/${project.name}"
issueTrackerUrl = "https://github.com/davidB/${project.name}/issues"
vcsUrl = "https://github.com/davidB/${project.name}.git"
licenses = ['CC0-1.0']
publicDownloadNumbers = true
version {
name = project.version
vcsTag = project.version
//attributes = []
//gpg {
// sign = true //Determines whether to GPG sign the files. The default is false
// passphrase = 'optional, the passphrase for GPG signing'
//}
}
}
}

114 changes: 0 additions & 114 deletions pom.xml

This file was deleted.

0 comments on commit f628ad2

Please sign in to comment.