Skip to content

Commit

Permalink
Updated gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
osiegmar committed Feb 12, 2019
1 parent 9a1e42d commit c18823f
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 57 deletions.
110 changes: 56 additions & 54 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
apply plugin: 'java'
apply plugin: 'findbugs'
apply plugin: 'checkstyle'
apply plugin: 'maven'
apply plugin: 'signing'
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'checkstyle'
id 'com.github.spotbugs' version '1.6.9'
}

group = "de.siegmar"
archivesBaseName = "logback-gelf"
version = "1.1.1-SNAPSHOT"
version = "2.0.0-SNAPSHOT"

sourceCompatibility = 1.7

Expand All @@ -15,20 +17,20 @@ repositories {
}

dependencies {
compile 'ch.qos.logback:logback-classic:1.2.3'
testCompile 'junit:junit:4.12'
testCompile 'com.google.guava:guava:19.0'
testCompile 'com.fasterxml.jackson.core:jackson-databind:2.7.2'
api 'ch.qos.logback:logback-classic:1.2.3'
testImplementation 'junit:junit:4.12'
testImplementation 'com.google.guava:guava:27.0.1-jre'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8'
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}

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

artifacts {
Expand All @@ -40,61 +42,61 @@ checkstyle {
configProperties = [samedir: "${rootDir}/config/checkstyle", project_loc: "${rootDir}"]
}

tasks.withType(FindBugs) {
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
}

if (hasProperty('signing.keyId')) {
signing {
sign configurations.archives
}
}

if (hasProperty('ossrhUsername')) {
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'Logback GELF'
packaging 'jar'
description 'Logback appender for sending GELF messages with zero additional dependencies.'
url 'https://github.com/osiegmar/logback-gelf'

scm {
connection 'scm:git:https://github.com/osiegmar/logback-gelf.git'
developerConnection 'scm:git:https://github.com/osiegmar/logback-gelf.git'
url 'https://github.com/osiegmar/logback-gelf'
}

publishing {
publications {
mavenJava(MavenPublication) {
artifactId = jar.archiveBaseName

from components.java
artifact sourcesJar
artifact javadocJar

pom {
name = 'Logback GELF'
description = 'Logback appender for sending GELF messages with zero additional dependencies.'
url = 'https://github.com/osiegmar/logback-gelf'
licenses {
license {
name 'GNU Lesser General Public License version 2.1'
url 'http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt'
name = 'GNU Lesser General Public License version 2.1'
url = 'http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt'
}
}

scm {
url = 'https://github.com/osiegmar/logback-gelf'
connection = 'scm:git:https://github.com/osiegmar/logback-gelf.git'
}
developers {
developer {
id 'osiegmar'
name 'Oliver Siegmar'
email '[email protected]'
id = 'osiegmar'
name = 'Oliver Siegmar'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
credentials {
username "$ossrhUsername"
password "$ossrhPassword"
}
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}

signing {
sign publishing.publications.mavenJava
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down

0 comments on commit c18823f

Please sign in to comment.