update to Java named module, Gradle 6.4, JUnit 5
This commit is contained in:
parent
e7d7f68554
commit
57dd5fabc9
35 changed files with 407 additions and 324 deletions
259
build.gradle
259
build.gradle
|
@ -1,248 +1,29 @@
|
|||
plugins {
|
||||
id "com.github.spotbugs" version "2.0.1"
|
||||
id "de.marcphilipp.nexus-publish" version "0.4.0"
|
||||
id "io.codearte.nexus-staging" version "0.21.1"
|
||||
id "org.xbib.gradle.plugin.asciidoctor" version "1.5.6.0.1"
|
||||
}
|
||||
|
||||
apply plugin: 'org.xbib.gradle.plugin.asciidoctor'
|
||||
apply plugin: "io.codearte.nexus-staging"
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'java'
|
||||
apply plugin: "com.github.spotbugs"
|
||||
|
||||
dependencies {
|
||||
testCompile "org.junit.jupiter:junit-jupiter-api:${project.property('junit.version')}"
|
||||
testCompile "org.junit.jupiter:junit-jupiter-params:${project.property('junit.version')}"
|
||||
testCompile "org.junit.jupiter:junit-jupiter-engine:${project.property('junit.version')}"
|
||||
testCompile "org.junit.vintage:junit-vintage-engine:${project.property('junit.version')}"
|
||||
testCompile "junit:junit:${project.property('junit4.version')}"
|
||||
}
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.compilerArgs << "-Xlint:all,-fallthrough"
|
||||
if (!options.compilerArgs.contains("-processor")) {
|
||||
options.compilerArgs << '-proc:none'
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes('Implementation-Title': project.name)
|
||||
attributes('Implementation-Version': project.version)
|
||||
attributes('Implementation-Vendor': 'Jörg Prante')
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
failFast = false
|
||||
testLogging {
|
||||
events 'STARTED', 'PASSED', 'FAILED', 'SKIPPED'
|
||||
showStandardStreams = false
|
||||
}
|
||||
afterSuite { desc, result ->
|
||||
if (!desc.parent) {
|
||||
println "\nTest result: ${result.resultType}"
|
||||
println "Test summary: ${result.testCount} tests, " +
|
||||
"${result.successfulTestCount} succeeded, " +
|
||||
"${result.failedTestCount} failed, " +
|
||||
"${result.skippedTestCount} skipped"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
clean {
|
||||
delete 'out'
|
||||
}
|
||||
|
||||
asciidoctor {
|
||||
attributes toc: 'left',
|
||||
doctype: 'book',
|
||||
icons: 'font',
|
||||
encoding: 'utf-8',
|
||||
sectlink: true,
|
||||
sectanchors: true,
|
||||
linkattrs: true,
|
||||
imagesdir: 'img',
|
||||
'source-highlighter': 'coderay'
|
||||
}
|
||||
|
||||
spotbugs {
|
||||
toolVersion = '3.1.12'
|
||||
sourceSets = [sourceSets.main]
|
||||
ignoreFailures = true
|
||||
effort = "max"
|
||||
reportLevel = "high"
|
||||
// includeFilter = file("config/findbugs/findbugs-include.xml")
|
||||
// excludeFilter = file("config/findbugs/findbugs-excludes.xml")
|
||||
}
|
||||
|
||||
tasks.withType(com.github.spotbugs.SpotBugsTask) {
|
||||
reports.xml.enabled = false
|
||||
reports.html.enabled = true
|
||||
}
|
||||
|
||||
/*javadoc {
|
||||
options.docletpath = configurations.asciidoclet.files.asType(List)
|
||||
options.doclet = "org.xbib.asciidoclet.Asciidoclet"
|
||||
options.overview = "src/docs/asciidoclet/overview.adoc"
|
||||
options.addStringOption "-base-dir", "${projectDir}"
|
||||
options.addStringOption "-attribute",
|
||||
"name=${project.name},version=${project.version},title-link=https://github.com/jprante/${project.name}"
|
||||
configure(options) {
|
||||
noTimestamp = true
|
||||
}
|
||||
}*/
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: classes) {
|
||||
from javadoc
|
||||
into "build/tmp"
|
||||
archiveClassifier.set('javadoc')
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
from sourceSets.main.allSource
|
||||
into "build/tmp"
|
||||
archiveClassifier.set('sources')
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives javadocJar, sourcesJar
|
||||
}
|
||||
|
||||
ext {
|
||||
ext {
|
||||
user = 'jprante'
|
||||
name = 'netty-http'
|
||||
projectDescription = 'HTTP client and server for Netty'
|
||||
scmUrl = 'https://github.com/jprante/netty-http'
|
||||
scmConnection = 'scm:git:git://github.com/jprante/netty-http.git'
|
||||
scmDeveloperConnection = 'scm:git:git://github.com/jprante/netty-http.git'
|
||||
inceptionDate = '2012'
|
||||
organizationName = 'xbib'
|
||||
organizationUrl = 'http://xbib.org'
|
||||
description = 'HTTP client and server for Netty'
|
||||
inceptionYear = '2012'
|
||||
url = 'https://github.com/' + user + '/' + name
|
||||
scmUrl = 'https://github.com/' + user + '/' + name
|
||||
scmConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git'
|
||||
scmDeveloperConnection = 'scm:git:ssh://git@github.com:' + user + '/' + name + '.git'
|
||||
issueManagementSystem = 'Github'
|
||||
issueManagementUrl = ext.scmUrl + '/issues'
|
||||
licenseName = 'The Apache License, Version 2.0'
|
||||
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
}
|
||||
|
||||
/*publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
groupId project.group
|
||||
artifactId project.name
|
||||
version project.version
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
pom {
|
||||
name = project.name
|
||||
description = projectDescription
|
||||
inceptionYear = inceptionDate
|
||||
url = scmUrl
|
||||
organization {
|
||||
name = organizationName
|
||||
url = organizationUrl
|
||||
}
|
||||
scm {
|
||||
url = scmUrl
|
||||
connection = scmConnection
|
||||
developerConnection = scmDeveloperConnection
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name = licenseName
|
||||
url = licenseUrl
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = user
|
||||
name = 'Jörg Prante'
|
||||
email = 'joergprante@gmail.com'
|
||||
url = 'https://github.com/jprante'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
|
||||
credentials {
|
||||
username ossrhUsername
|
||||
password ossrhPassword
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
sign publishing.publications.mavenJava
|
||||
}*/
|
||||
|
||||
|
||||
task sonaTypeUpload(type: Upload) {
|
||||
group = 'publish'
|
||||
configuration = configurations.archives
|
||||
uploadDescriptor = true
|
||||
repositories {
|
||||
if (project.hasProperty('ossrhUsername')) {
|
||||
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 {
|
||||
groupId project.group
|
||||
artifactId project.name
|
||||
version project.version
|
||||
name project.name
|
||||
description description
|
||||
packaging 'jar'
|
||||
inceptionYear inceptionDate
|
||||
url scmUrl
|
||||
organization {
|
||||
name organizationName
|
||||
url organizationUrl
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id user
|
||||
name 'Jörg Prante'
|
||||
email 'joergprante@gmail.com'
|
||||
url 'https://github.com/jprante'
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url scmUrl
|
||||
connection scmConnection
|
||||
developerConnection scmDeveloperConnection
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name licenseName
|
||||
url licenseUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
nexusStaging {
|
||||
packageGroup = "org.xbib"
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'java-library'
|
||||
apply from: rootProject.file('gradle/ide/idea.gradle')
|
||||
apply from: rootProject.file('gradle/compile/java.gradle')
|
||||
apply from: rootProject.file('gradle/test/junit5.gradle')
|
||||
apply from: rootProject.file('gradle/publishing/publication.gradle')
|
||||
}
|
||||
|
||||
apply from: rootProject.file('gradle/publishing/sonatype.gradle')
|
||||
|
|
|
@ -1,34 +1,19 @@
|
|||
group = org.xbib
|
||||
name = netty-http
|
||||
version = 4.1.49.0
|
||||
version = 4.1.49.1
|
||||
|
||||
# netty
|
||||
gradle.wrapper.version = 6.4.1
|
||||
netty.version = 4.1.49.Final
|
||||
tcnative.version = 2.0.29.Final
|
||||
tcnative-legacy-macosx.version = 2.0.26.Final
|
||||
|
||||
# for netty-http-common
|
||||
xbib-net-url.version = 2.0.3
|
||||
|
||||
# for netty-http-server
|
||||
xbib.net.version = 2.0.4
|
||||
bouncycastle.version = 1.64
|
||||
|
||||
# for netty-http-server-reactive
|
||||
reactivestreams.version = 1.0.2
|
||||
|
||||
# for netty-http-server-rest
|
||||
xbib-guice.version = 4.0.4
|
||||
|
||||
# for rx
|
||||
reactivex.version = 1.2.10
|
||||
|
||||
# for test
|
||||
junit.version = 5.5.2
|
||||
junit4.version = 4.12
|
||||
reactivex.version = 1.3.8
|
||||
conscrypt.version = 2.2.1
|
||||
jackson.version = 2.9.10
|
||||
hamcrest.version = 2.1
|
||||
mockito.version = 3.1.0
|
||||
|
||||
# doc
|
||||
asciidoclet.version = 1.5.6
|
||||
junit.version = 5.6.2
|
||||
junit4.version = 4.13
|
||||
|
|
37
gradle/compile/java.gradle
Normal file
37
gradle/compile/java.gradle
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
apply plugin: 'java-library'
|
||||
|
||||
java {
|
||||
modularity.inferModulePath.set(true)
|
||||
}
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes('Implementation-Title': project.name)
|
||||
attributes('Implementation-Version': project.version)
|
||||
attributes('Implementation-Vendor': 'Jörg Prante')
|
||||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier 'javadoc'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar, javadocJar
|
||||
}
|
55
gradle/documentation/asciidoc.gradle
Normal file
55
gradle/documentation/asciidoc.gradle
Normal file
|
@ -0,0 +1,55 @@
|
|||
apply plugin: 'org.xbib.gradle.plugin.asciidoctor'
|
||||
|
||||
configurations {
|
||||
asciidoclet
|
||||
}
|
||||
|
||||
dependencies {
|
||||
asciidoclet "org.asciidoctor:asciidoclet:${project.property('asciidoclet.version')}"
|
||||
}
|
||||
|
||||
|
||||
asciidoctor {
|
||||
backends 'html5'
|
||||
outputDir = file("${rootProject.projectDir}/docs")
|
||||
separateOutputDirs = false
|
||||
attributes 'source-highlighter': 'coderay',
|
||||
idprefix: '',
|
||||
idseparator: '-',
|
||||
toc: 'left',
|
||||
doctype: 'book',
|
||||
icons: 'font',
|
||||
encoding: 'utf-8',
|
||||
sectlink: true,
|
||||
sectanchors: true,
|
||||
linkattrs: true,
|
||||
imagesdir: 'img',
|
||||
stylesheet: "${projectDir}/src/docs/asciidoc/css/foundation.css"
|
||||
}
|
||||
|
||||
|
||||
/*javadoc {
|
||||
options.docletpath = configurations.asciidoclet.files.asType(List)
|
||||
options.doclet = 'org.asciidoctor.Asciidoclet'
|
||||
//options.overview = "src/docs/asciidoclet/overview.adoc"
|
||||
options.addStringOption "-base-dir", "${projectDir}"
|
||||
options.addStringOption "-attribute",
|
||||
"name=${project.name},version=${project.version},title-link=https://github.com/xbib/${project.name}"
|
||||
configure(options) {
|
||||
noTimestamp = true
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
/*javadoc {
|
||||
options.docletpath = configurations.asciidoclet.files.asType(List)
|
||||
options.doclet = 'org.asciidoctor.Asciidoclet'
|
||||
options.overview = "${rootProject.projectDir}/src/docs/asciidoclet/overview.adoc"
|
||||
options.addStringOption "-base-dir", "${projectDir}"
|
||||
options.addStringOption "-attribute",
|
||||
"name=${project.name},version=${project.version},title-link=https://github.com/xbib/${project.name}"
|
||||
options.destinationDirectory(file("${projectDir}/docs/javadoc"))
|
||||
configure(options) {
|
||||
noTimestamp = true
|
||||
}
|
||||
}*/
|
13
gradle/ide/idea.gradle
Normal file
13
gradle/ide/idea.gradle
Normal file
|
@ -0,0 +1,13 @@
|
|||
apply plugin: 'idea'
|
||||
|
||||
idea {
|
||||
module {
|
||||
outputDir file('build/classes/java/main')
|
||||
testOutputDir file('build/classes/java/test')
|
||||
}
|
||||
}
|
||||
|
||||
if (project.convention.findPlugin(JavaPluginConvention)) {
|
||||
//sourceSets.main.output.classesDirs = file("build/classes/java/main")
|
||||
//sourceSets.test.output.classesDirs = file("build/classes/java/test")
|
||||
}
|
64
gradle/publishing/publication.gradle
Normal file
64
gradle/publishing/publication.gradle
Normal file
|
@ -0,0 +1,64 @@
|
|||
|
||||
apply plugin: "de.marcphilipp.nexus-publish"
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
pom {
|
||||
name = project.name
|
||||
description = rootProject.ext.description
|
||||
url = rootProject.ext.url
|
||||
inceptionYear = rootProject.ext.inceptionYear
|
||||
packaging = 'jar'
|
||||
organization {
|
||||
name = 'xbib'
|
||||
url = 'https://xbib.org'
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = 'jprante'
|
||||
name = 'Jörg Prante'
|
||||
email = 'joergprante@gmail.com'
|
||||
url = 'https://github.com/jprante'
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url = rootProject.ext.scmUrl
|
||||
connection = rootProject.ext.scmConnection
|
||||
developerConnection = rootProject.ext.scmDeveloperConnection
|
||||
}
|
||||
issueManagement {
|
||||
system = rootProject.ext.issueManagementSystem
|
||||
url = rootProject.ext.issueManagementUrl
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name = rootProject.ext.licenseName
|
||||
url = rootProject.ext.licenseUrl
|
||||
distribution = 'repo'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("signing.keyId")) {
|
||||
apply plugin: 'signing'
|
||||
signing {
|
||||
sign publishing.publications.mavenJava
|
||||
}
|
||||
}
|
||||
|
||||
nexusPublishing {
|
||||
repositories {
|
||||
sonatype {
|
||||
username = project.property('ossrhUsername')
|
||||
password = project.property('ossrhPassword')
|
||||
packageGroup = "org.xbib"
|
||||
}
|
||||
}
|
||||
}
|
11
gradle/publishing/sonatype.gradle
Normal file
11
gradle/publishing/sonatype.gradle
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
|
||||
|
||||
apply plugin: 'io.codearte.nexus-staging'
|
||||
|
||||
nexusStaging {
|
||||
username = project.property('ossrhUsername')
|
||||
password = project.property('ossrhPassword')
|
||||
packageGroup = "org.xbib"
|
||||
}
|
||||
}
|
27
gradle/test/junit5.gradle
Normal file
27
gradle/test/junit5.gradle
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
def junitVersion = project.hasProperty('junit.version')?project.property('junit.version'):'5.6.2'
|
||||
def hamcrestVersion = project.hasProperty('hamcrest.version')?project.property('hamcrest.version'):'2.2'
|
||||
|
||||
dependencies {
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}"
|
||||
testImplementation "org.hamcrest:hamcrest-library:${hamcrestVersion}"
|
||||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
failFast = true
|
||||
testLogging {
|
||||
events 'STARTED', 'PASSED', 'FAILED', 'SKIPPED'
|
||||
}
|
||||
afterSuite { desc, result ->
|
||||
if (!desc.parent) {
|
||||
println "\nTest result: ${result.resultType}"
|
||||
println "Test summary: ${result.testCount} tests, " +
|
||||
"${result.successfulTestCount} succeeded, " +
|
||||
"${result.failedTestCount} failed, " +
|
||||
"${result.skippedTestCount} skipped"
|
||||
}
|
||||
}
|
||||
}
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
|||
#Mon Mar 09 11:04:01 CET 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
||||
#Wed May 20 11:53:57 CEST 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
31
gradlew
vendored
31
gradlew
vendored
|
@ -82,6 +82,7 @@ esac
|
|||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
|
@ -129,6 +130,7 @@ fi
|
|||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
|
@ -154,19 +156,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
|||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
@ -175,14 +177,9 @@ save () {
|
|||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
4
gradlew.bat
vendored
4
gradlew.bat
vendored
|
@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
|||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@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="-Xmx64m" "-Xms64m"
|
||||
|
||||
|
@ -81,6 +84,7 @@ set CMD_LINE_ARGS=%*
|
|||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dependencies {
|
||||
compile project(":netty-http-common")
|
||||
compile "org.bouncycastle:bcpkix-jdk15on:${project.property('bouncycastle.version')}"
|
||||
api project(":netty-http-common")
|
||||
api "org.bouncycastle:bcpkix-jdk15on:${project.property('bouncycastle.version')}"
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
dependencies {
|
||||
compile project(":netty-http-common")
|
||||
api project(":netty-http-common")
|
||||
}
|
10
netty-http-client-api/src/main/java/module-info.java
Normal file
10
netty-http-client-api/src/main/java/module-info.java
Normal file
|
@ -0,0 +1,10 @@
|
|||
module org.xbib.netty.http.client.api {
|
||||
exports org.xbib.netty.http.client.api;
|
||||
requires org.xbib.netty.http.common;
|
||||
requires org.xbib.net.url;
|
||||
requires io.netty.transport;
|
||||
requires io.netty.buffer;
|
||||
requires io.netty.common;
|
||||
requires io.netty.codec.http;
|
||||
requires io.netty.codec.http2;
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
dependencies {
|
||||
compile project(':netty-http-client')
|
||||
api project(':netty-http-client')
|
||||
}
|
9
netty-http-client-rest/src/main/java/module-info.java
Normal file
9
netty-http-client-rest/src/main/java/module-info.java
Normal file
|
@ -0,0 +1,9 @@
|
|||
module org.xbib.netty.http.client.rest {
|
||||
exports org.xbib.netty.http.client.rest;
|
||||
requires org.xbib.netty.http.client.api;
|
||||
requires org.xbib.netty.http.client;
|
||||
requires org.xbib.netty.http.common;
|
||||
requires org.xbib.net.url;
|
||||
requires io.netty.buffer;
|
||||
requires io.netty.codec.http;
|
||||
}
|
|
@ -1,16 +1,14 @@
|
|||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
dependencies {
|
||||
compile project(":netty-http-client-api")
|
||||
compile "io.netty:netty-handler-proxy:${project.property('netty.version')}"
|
||||
runtime "org.bouncycastle:bcpkix-jdk15on:${project.property('bouncycastle.version')}"
|
||||
api project(":netty-http-client-api")
|
||||
implementation "io.netty:netty-handler-proxy:${project.property('netty.version')}"
|
||||
testImplementation "com.fasterxml.jackson.core:jackson-databind:${project.property('jackson.version')}"
|
||||
testImplementation "org.conscrypt:conscrypt-openjdk-uber:${project.property('conscrypt.version')}"
|
||||
testRuntimeOnly "org.bouncycastle:bcpkix-jdk15on:${project.property('bouncycastle.version')}"
|
||||
if (Os.isFamily(Os.FAMILY_MAC)) {
|
||||
runtime "io.netty:netty-tcnative-boringssl-static:${project.property('tcnative-legacy-macosx.version')}"
|
||||
//runtime project(':netty-http-kqueue')
|
||||
testRuntimeOnly "io.netty:netty-tcnative-boringssl-static:${project.property('tcnative-legacy-macosx.version')}"
|
||||
} else if (Os.isFamily(Os.FAMILY_UNIX)) {
|
||||
runtime "io.netty:netty-tcnative-boringssl-static:${project.property('tcnative.version')}"
|
||||
//runtime project(':netty-http-epoll')
|
||||
testRuntimeOnly "io.netty:netty-tcnative-boringssl-static:${project.property('tcnative.version')}"
|
||||
}
|
||||
testCompile "org.conscrypt:conscrypt-openjdk-uber:${project.property('conscrypt.version')}"
|
||||
testCompile "com.fasterxml.jackson.core:jackson-databind:${project.property('jackson.version')}"
|
||||
}
|
||||
|
|
23
netty-http-client/src/main/java/module-info.java
Normal file
23
netty-http-client/src/main/java/module-info.java
Normal file
|
@ -0,0 +1,23 @@
|
|||
module org.xbib.netty.http.client {
|
||||
exports org.xbib.netty.http.client;
|
||||
exports org.xbib.netty.http.client.cookie;
|
||||
exports org.xbib.netty.http.client.handler.http;
|
||||
exports org.xbib.netty.http.client.handler.http2;
|
||||
exports org.xbib.netty.http.client.pool;
|
||||
exports org.xbib.netty.http.client.retry;
|
||||
exports org.xbib.netty.http.client.transport;
|
||||
requires org.xbib.netty.http.client.api;
|
||||
requires org.xbib.netty.http.common;
|
||||
requires org.xbib.net.url;
|
||||
requires io.netty.transport;
|
||||
requires io.netty.buffer;
|
||||
requires io.netty.common;
|
||||
requires io.netty.handler;
|
||||
requires io.netty.handler.proxy;
|
||||
requires io.netty.codec.http;
|
||||
requires io.netty.codec.http2;
|
||||
requires java.logging;
|
||||
provides org.xbib.netty.http.client.api.ProtocolProvider with
|
||||
org.xbib.netty.http.client.Http1Provider,
|
||||
org.xbib.netty.http.client.Http2Provider;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package org.xbib.netty.http.client.test.cookie;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.xbib.netty.http.client.Client;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.xbib.netty.http.client.test.http1;
|
||||
|
||||
import io.netty.handler.codec.http.HttpMethod;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.xbib.netty.http.client.Client;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dependencies {
|
||||
compile "org.xbib:net-url:${project.property('xbib-net-url.version')}"
|
||||
compile "io.netty:netty-codec-http2:${project.property('netty.version')}"
|
||||
api "org.xbib:net-url:${project.property('xbib.net.version')}"
|
||||
api "io.netty:netty-codec-http2:${project.property('netty.version')}"
|
||||
}
|
||||
|
|
12
netty-http-common/src/main/java/module-info.java
Normal file
12
netty-http-common/src/main/java/module-info.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
module org.xbib.netty.http.common {
|
||||
exports org.xbib.netty.http.common;
|
||||
exports org.xbib.netty.http.common.cookie;
|
||||
exports org.xbib.netty.http.common.net;
|
||||
exports org.xbib.netty.http.common.mime;
|
||||
exports org.xbib.netty.http.common.security;
|
||||
exports org.xbib.netty.http.common.util;
|
||||
requires io.netty.transport;
|
||||
requires io.netty.handler;
|
||||
requires org.xbib.net.url;
|
||||
requires java.logging;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
dependencies {
|
||||
compile project(":netty-http-common")
|
||||
compile "io.netty:netty-transport-native-epoll:${project.property('netty.version')}:linux-x86_64"
|
||||
api project(":netty-http-common")
|
||||
implementation "io.netty:netty-transport-native-epoll:${project.property('netty.version')}:linux-x86_64"
|
||||
}
|
||||
|
|
8
netty-http-epoll/src/main/java/module-info.java
Normal file
8
netty-http-epoll/src/main/java/module-info.java
Normal file
|
@ -0,0 +1,8 @@
|
|||
module org.xbib.netty.http.epoll {
|
||||
exports org.xbib.netty.http.epoll;
|
||||
requires org.xbib.netty.http.common;
|
||||
requires io.netty.transport;
|
||||
requires io.netty.transport.epoll;
|
||||
provides org.xbib.netty.http.common.TransportProvider with
|
||||
org.xbib.netty.http.epoll.EpollTransportProvider;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
dependencies {
|
||||
compile project(":netty-http-common")
|
||||
compile "io.netty:netty-transport-native-kqueue:${project.property('netty.version')}:osx-x86_64"
|
||||
api project(":netty-http-common")
|
||||
api "io.netty:netty-transport-native-kqueue:${project.property('netty.version')}:osx-x86_64"
|
||||
}
|
||||
|
|
8
netty-http-kqueue/src/main/java/module-info.java
Normal file
8
netty-http-kqueue/src/main/java/module-info.java
Normal file
|
@ -0,0 +1,8 @@
|
|||
module org.xbib.netty.http.kqueue {
|
||||
exports org.xbib.netty.http.kqueue;
|
||||
requires org.xbib.netty.http.common;
|
||||
requires io.netty.transport;
|
||||
requires io.netty.transport.kqueue;
|
||||
provides org.xbib.netty.http.common.TransportProvider with
|
||||
org.xbib.netty.http.kqueue.KqueueTransportProvider;
|
||||
}
|
|
@ -1,7 +1,8 @@
|
|||
dependencies {
|
||||
compile "io.netty:netty-codec-http:${project.property('netty.version')}"
|
||||
compile "io.netty:netty-transport-native-epoll:${project.property('netty.version')}"
|
||||
compile "io.reactivex:rxjava:${project.property('reactivex.version')}"
|
||||
testCompile "org.hamcrest:hamcrest-library:${project.property('hamcrest.version')}"
|
||||
testCompile "org.mockito:mockito-core:${project.property('mockito.version')}"
|
||||
api "io.reactivex:rxjava:${project.property('reactivex.version')}"
|
||||
implementation "io.netty:netty-codec-http:${project.property('netty.version')}"
|
||||
implementation "io.netty:netty-transport-native-epoll:${project.property('netty.version')}"
|
||||
testImplementation "org.mockito:mockito-core:${project.property('mockito.version')}"
|
||||
testImplementation "org.junit.vintage:junit-vintage-engine:${project.property('junit.version')}"
|
||||
testImplementation "junit:junit:${project.property('junit4.version')}"
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
dependencies {
|
||||
compile project(":netty-http-common")
|
||||
api project(":netty-http-common")
|
||||
}
|
12
netty-http-server-api/src/main/java/module-info.java
Normal file
12
netty-http-server-api/src/main/java/module-info.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
module org.xbib.netty.http.server.api {
|
||||
exports org.xbib.netty.http.server.api;
|
||||
exports org.xbib.netty.http.server.api.annotation;
|
||||
requires org.xbib.net.url;
|
||||
requires org.xbib.netty.http.common;
|
||||
requires io.netty.buffer;
|
||||
requires io.netty.common;
|
||||
requires io.netty.handler;
|
||||
requires io.netty.transport;
|
||||
requires io.netty.codec.http;
|
||||
requires io.netty.codec.http2;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
dependencies {
|
||||
compile project(':netty-http-server')
|
||||
compile "org.reactivestreams:reactive-streams:${project.property('reactivestreams.version')}"
|
||||
testCompile("org.reactivestreams:reactive-streams-tck:${project.property('reactivestreams.version')}") {
|
||||
api "org.reactivestreams:reactive-streams:${project.property('reactivestreams.version')}"
|
||||
api project(':netty-http-server')
|
||||
testImplementation("org.reactivestreams:reactive-streams-tck:${project.property('reactivestreams.version')}") {
|
||||
exclude module: 'testng'
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
dependencies {
|
||||
compile project(":netty-http-server")
|
||||
compile "org.xbib:guice:${project.property('xbib-guice.version')}"
|
||||
api project(":netty-http-server")
|
||||
implementation "org.xbib:guice:${project.property('xbib-guice.version')}"
|
||||
}
|
||||
|
|
6
netty-http-server-rest/src/main/java/module-info.java
Normal file
6
netty-http-server-rest/src/main/java/module-info.java
Normal file
|
@ -0,0 +1,6 @@
|
|||
module org.xbib.netty.http.server.rest {
|
||||
exports org.xbib.netty.http.server.rest;
|
||||
exports org.xbib.netty.http.server.rest.util;
|
||||
requires org.xbib.netty.http.server;
|
||||
requires io.netty.transport;
|
||||
}
|
|
@ -1,15 +1,13 @@
|
|||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
dependencies {
|
||||
compile project(":netty-http-common")
|
||||
compile project(":netty-http-server-api")
|
||||
api project(":netty-http-server-api")
|
||||
testImplementation project(":netty-http-client")
|
||||
testImplementation project(":netty-http-bouncycastle")
|
||||
testRuntimeOnly "org.bouncycastle:bcpkix-jdk15on:${project.property('bouncycastle.version')}"
|
||||
if (Os.isFamily(Os.FAMILY_MAC)) {
|
||||
testRuntime "io.netty:netty-tcnative-boringssl-static:${project.property('tcnative-legacy-macosx.version')}"
|
||||
//runtime project(':netty-http-kqueue')
|
||||
testRuntimeOnly "io.netty:netty-tcnative-boringssl-static:${project.property('tcnative-legacy-macosx.version')}"
|
||||
} else if (Os.isFamily(Os.FAMILY_UNIX)) {
|
||||
testRuntime "io.netty:netty-tcnative-boringssl-static:${project.property('tcnative.version')}"
|
||||
//testRuntime project(':netty-http-epoll')
|
||||
testRuntimeOnly "io.netty:netty-tcnative-boringssl-static:${project.property('tcnative.version')}"
|
||||
}
|
||||
testCompile project(":netty-http-client")
|
||||
testCompile project(":netty-http-bouncycastle")
|
||||
}
|
||||
|
|
24
netty-http-server/src/main/java/module-info.java
Normal file
24
netty-http-server/src/main/java/module-info.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
module org.xbib.netty.http.server {
|
||||
exports org.xbib.netty.http.server;
|
||||
exports org.xbib.netty.http.server.cookie;
|
||||
exports org.xbib.netty.http.server.endpoint;
|
||||
exports org.xbib.netty.http.server.endpoint.service;
|
||||
exports org.xbib.netty.http.server.handler;
|
||||
exports org.xbib.netty.http.server.handler.http;
|
||||
exports org.xbib.netty.http.server.handler.http2;
|
||||
exports org.xbib.netty.http.server.handler.stream;
|
||||
exports org.xbib.netty.http.server.transport;
|
||||
exports org.xbib.netty.http.server.util;
|
||||
requires org.xbib.netty.http.server.api;
|
||||
requires org.xbib.netty.http.common;
|
||||
requires org.xbib.net.url;
|
||||
requires io.netty.buffer;
|
||||
requires io.netty.common;
|
||||
requires io.netty.handler;
|
||||
requires io.netty.transport;
|
||||
requires io.netty.codec.http;
|
||||
requires java.logging;
|
||||
provides org.xbib.netty.http.server.api.ProtocolProvider with
|
||||
org.xbib.netty.http.server.Http1Provider,
|
||||
org.xbib.netty.http.server.Http2Provider;
|
||||
}
|
Loading…
Reference in a new issue