-
Notifications
You must be signed in to change notification settings - Fork 439
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Long due 1.6 release containing relevant pull requests since ~2018. U…
…pdated the build system a bit as well
- Loading branch information
1 parent
13e9a2f
commit 9ca8812
Showing
16 changed files
with
316 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,45 @@ | ||
buildscript { | ||
|
||
ext { | ||
set("jacksonVersion", "2.10.2") | ||
set("springVersion", "4.3.26.RELEASE") | ||
set("springBotVersion", "1.4.7.RELEASE") | ||
set("jettyVersion", "9.4.0.RC3") | ||
set("slf4jVersion", "1.7.30") | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
mavenCentral() | ||
jcenter() | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
} | ||
|
||
dependencies { | ||
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3" | ||
classpath("com.adarshr:gradle-test-logger-plugin:1.6.0") | ||
} | ||
} | ||
|
||
plugins { | ||
id 'java' | ||
id 'nebula.optional-base' version '3.1.0' | ||
id 'nebula.provided-base' version '3.1.0' | ||
id 'findbugs' | ||
id 'pmd' | ||
id 'jacoco' | ||
id 'nebula.info' version '3.4.1' | ||
id 'com.github.ben-manes.versions' version '0.13.0' | ||
id 'osgi' | ||
id 'maven-publish' | ||
id 'nebula.nebula-javadoc-jar' version '2.2.2' | ||
id 'nebula.nebula-source-jar' version '2.2.2' | ||
id 'com.jfrog.bintray' version '1.7.3' | ||
id('jacoco') | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
gradlePluginPortal() | ||
mavenCentral() | ||
jcenter() | ||
} | ||
|
||
description = 'This project aims to provide the facility to easily implement JSON-RPC for the java programming language.' | ||
version = '1.5.3-2' | ||
group = 'com.github.briandilley.jsonrpc4j' | ||
apply plugin: "java" | ||
apply plugin: "com.adarshr.test-logger" | ||
|
||
group = "com.github.briandilley.jsonrpc4j" | ||
version = "1.6" | ||
description = """ | ||
This project aims to provide the facility to easily implement JSON-RPC for the java programming language. | ||
""" | ||
|
||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
|
@@ -25,159 +48,97 @@ compileJava { | |
options.encoding = 'UTF-8' | ||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" | ||
} | ||
|
||
ext { | ||
releaseVersion = !version.toString().endsWith('-SNAPSHOT') | ||
} | ||
|
||
test { | ||
maxParallelForks 5 | ||
testLogging { | ||
exceptionFormat = "FULL" | ||
showExceptions = true | ||
showStackTraces = true | ||
showCauses = true | ||
} | ||
maxParallelForks = 1 | ||
forkEvery = 1 | ||
maxHeapSize = "2g" | ||
finalizedBy jacocoTestReport | ||
} | ||
compileTestJava { | ||
options.encoding = 'UTF-8' | ||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" | ||
|
||
jacoco { | ||
toolVersion = "0.8.5" | ||
} | ||
|
||
apply plugin: "maven" | ||
jacocoTestReport { | ||
dependsOn test | ||
reports { | ||
xml.enabled true | ||
csv.enabled true | ||
html.enabled true | ||
} | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
java { | ||
registerFeature('servletSupport') { | ||
usingSourceSet(sourceSets.main) | ||
} | ||
registerFeature('springSupport') { | ||
usingSourceSet(sourceSets.main) | ||
} | ||
} | ||
|
||
dependencies { | ||
ext { | ||
jacksonVersion = '2.10.2' | ||
springVersion = '4.3.26.RELEASE' | ||
springBotVersion = '1.4.7.RELEASE' | ||
jettyVersion = '9.4.0.RC3' | ||
slf4jVersion = '1.7.30' | ||
} | ||
|
||
compile 'net.iharder:base64:2.3.9' | ||
compile "org.slf4j:slf4j-api:${slf4jVersion}" | ||
provided 'javax.portlet:portlet-api:2.0' | ||
provided 'javax.servlet:javax.servlet-api:3.1.0' | ||
implementation 'net.iharder:base64:2.3.9' | ||
implementation "org.slf4j:slf4j-api:${slf4jVersion}" | ||
|
||
|
||
servletSupportImplementation 'javax.portlet:portlet-api:3.0.1' | ||
servletSupportImplementation 'javax.servlet:javax.servlet-api:4.0.1' | ||
|
||
compile "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}" | ||
compile "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" | ||
compile "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}" | ||
implementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}" | ||
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" | ||
implementation "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}" | ||
|
||
compile "org.springframework:spring-core:${springVersion}", optional | ||
compile "org.springframework:spring-context:${springVersion}", optional | ||
compile "org.springframework:spring-web:${springVersion}", optional | ||
compile "org.springframework:spring-webmvc:${springVersion}", optional | ||
springSupportImplementation "org.springframework:spring-core:${springVersion}" | ||
springSupportImplementation "org.springframework:spring-context:${springVersion}" | ||
springSupportImplementation "org.springframework:spring-web:${springVersion}" | ||
springSupportImplementation "org.springframework:spring-webmvc:${springVersion}" | ||
|
||
compile 'commons-codec:commons-codec:1.10', optional | ||
compile 'org.apache.httpcomponents:httpcore-nio:4.4.5', optional | ||
implementation 'commons-codec:commons-codec:1.10' | ||
implementation 'org.apache.httpcomponents:httpcore-nio:4.4.5' | ||
|
||
testCompile 'junit:junit:4.12' | ||
testCompile 'org.easymock:easymock:3.4' | ||
testCompile("org.springframework.boot:spring-boot-starter-web:${springBotVersion}") { | ||
testImplementation 'junit:junit:4.12' | ||
testImplementation 'org.easymock:easymock:3.4' | ||
testImplementation("org.springframework.boot:spring-boot-starter-web:${springBotVersion}") { | ||
exclude module: 'logback-classic' | ||
} | ||
testCompile "org.springframework.boot:spring-boot-starter-test:${springBotVersion}" | ||
testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}") { | ||
testImplementation "org.springframework.boot:spring-boot-starter-test:${springBotVersion}" | ||
testImplementation("org.eclipse.jetty:jetty-server:${jettyVersion}") { | ||
exclude module: 'javax.servlet' | ||
} | ||
testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}") { | ||
testImplementation("org.eclipse.jetty:jetty-servlet:${jettyVersion}") { | ||
exclude module: 'org.eclipse.jetty.orbit' | ||
} | ||
testRuntime 'org.apache.logging.log4j:log4j-slf4j-impl:2.7' | ||
testRuntime 'org.apache.logging.log4j:log4j-core:2.7' | ||
|
||
} | ||
|
||
jar { | ||
manifest { | ||
instruction 'Import-Package', | ||
'org.aopalliance.intercept;resolution:="optional"', | ||
'org.apache.http.*;resolution:="optional"', | ||
'org.springframework.*;resolution:="optional"', | ||
'org.apache.commons.logging;resolution:="optional"', | ||
'javax.portlet;resolution:="optional"', | ||
'javax.servlet*;version=0.0.0', | ||
'*' | ||
} | ||
} | ||
|
||
jacoco { | ||
toolVersion = '0.7.6.201602180812' | ||
reportsDir = file("$buildDir/customJacocoReportDir") | ||
} | ||
|
||
jacocoTestReport { | ||
reports { | ||
xml.enabled false | ||
csv.enabled false | ||
html.destination "${buildDir}/jacocoHtml" | ||
} | ||
task documentationJar(type: Jar) { | ||
archiveClassifier.set("javadoc") | ||
from javadoc | ||
} | ||
|
||
|
||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
from components.java | ||
artifact tasks.javadocJar | ||
artifact tasks.sourceJar | ||
pom.withXml { | ||
def root = asNode() | ||
root.appendNode('name', project.name) | ||
root.appendNode('description', project.description) | ||
def pomProperties = root.appendNode('properties') | ||
pomProperties.appendNode('release_Manifest_Version', '1.0') | ||
pomProperties.appendNode('release_Implementation_Title', "${project.group}:${project.name}:${project.version}") | ||
pomProperties.appendNode('release_Implementation_Version', project.version) | ||
pomProperties.appendNode('release_Build_Date', new Date().format('yyyy-MM-dd_HH:mm:ss')) | ||
pomProperties.appendNode('release_Created_By', "${System.getProperty('java.runtime.version')} (${System.getProperty('java.vm.specification.vendor')})") | ||
pomProperties.appendNode('release_Build_Java_Version', System.getProperty('java.version')) | ||
pomProperties.appendNode('release_X_Compile_Target_JDK', project.targetCompatibility) | ||
pomProperties.appendNode('release_X_Compile_Source_JDK', project.sourceCompatibility) | ||
root.appendNode('url', 'https://github.com/briandilley/jsonrpc4j') | ||
root.appendNode('scm').appendNode('url', 'https://github.com/briandilley/jsonrpc4j.git') | ||
def devs = root.appendNode('developers') | ||
def bernat = devs.appendNode('developer') | ||
bernat.appendNode('id', 'gaborbernat') | ||
bernat.appendNode('name', 'Bernát Gábor') | ||
bernat.appendNode('email', '[email protected]') | ||
def slipper = devs.appendNode('developer') | ||
slipper.appendNode('id', 'mslipper') | ||
slipper.appendNode('name', 'Matthew Slipper') | ||
slipper.appendNode('email', '[email protected]') | ||
def apache = root.appendNode('licenses').appendNode('license') | ||
apache.appendNode('name', 'The MIT License') | ||
apache.appendNode('url', 'https://opensource.org/licenses/MIT') | ||
apache.appendNode('distribution', 'repo') | ||
} | ||
} | ||
} | ||
task sourcesJar(type: Jar) { | ||
archiveClassifier.set("sources") | ||
from sourceSets.main.allSource | ||
} | ||
|
||
bintray { | ||
user = project.hasProperty('user') ? project.property('user') : 'not_set' | ||
key = project.hasProperty('key') ? project.property('key') : 'not_set' | ||
dryRun = false | ||
publish = true | ||
pkg { | ||
repo = 'maven' | ||
name = 'com.github.briandilley.jsonrpc4j:jsonrpc4j' | ||
desc = project.description | ||
licenses = ['MIT'] | ||
publications = ['release'] | ||
websiteUrl = 'https://briandilley.github.io/jsonrpc4j' | ||
issueTrackerUrl = 'https://github.com/briandilley/jsonrpc4j/issues' | ||
vcsUrl = '[email protected]:briandilley/jsonrpc4j.git' | ||
githubRepo = 'briandilley/jsonrpc' | ||
githubReleaseNotesFile = 'README.md' | ||
labels = ['json', 'rpc', 'java'] | ||
publicDownloadNumbers = true | ||
version { | ||
gpg { | ||
sign = true | ||
} | ||
name = project.version | ||
vcsTag = project.version | ||
released = new Date() | ||
} | ||
} | ||
artifacts { | ||
archives documentationJar, sourcesJar | ||
} | ||
|
||
bintrayUpload { | ||
dependsOn "publishToMavenLocal" | ||
} | ||
apply from: 'publishing.gradle' |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri Feb 17 20:25:46 GMT+03:00 2017 | ||
#Mon Oct 07 19:30:35 PDT 2019 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip | ||
zipStoreBase=GRADLE_USER_HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
allprojects { project -> | ||
publishing { | ||
publications { | ||
jsonrpc4j { | ||
pom { | ||
name = rootProject.name.capitalize() + (project.parent ? " ($shortName)" : '') | ||
description = project.description | ||
url = 'https://github.com/briandilley/jsonrpc4j' | ||
issueManagement { | ||
system = 'GitHub' | ||
url = 'https://github.com/briandilley/jsonrpc4j/issues' | ||
} | ||
ciManagement { | ||
system = 'Github Actions' | ||
url = 'https://github.com/briandilley/jsonrpc4j/actions' | ||
} | ||
inceptionYear = '2013' | ||
developers { | ||
developer { | ||
id = 'briandilley' | ||
name = 'Brian Dilley' | ||
email = '[email protected]' | ||
url = 'https://github.com/briandilley' | ||
timezone = 'America/Los_Angeles' | ||
} | ||
} | ||
licenses { | ||
license { | ||
name = 'The MIT License (MIT)' | ||
url = 'https://github.com/briandilley/jsonrpc4j/blob/develop/LICENSE' | ||
distribution = 'repo' | ||
comments = 'A business-friendly OSS license' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:https://github.com/briandilley/jsonrpc4j.git' | ||
developerConnection = '[email protected]:briandilley/jsonrpc4j.git' | ||
url = 'https://github.com/briandilley/jsonrpc4j' | ||
} | ||
distributionManagement { | ||
downloadUrl = 'https://github.com/briandilley/jsonrpc4j/releases' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.