Skip to content

Commit

Permalink
Fix http4k#397 Fix up dependencies to not pull in optionals to maven …
Browse files Browse the repository at this point in the history
…publications (http4k#398)

* replaced provided dependencies with compileOnly, so things appear correctly in maven POMs
  • Loading branch information
daviddenton authored Apr 19, 2020
1 parent 54d8f04 commit 5b74282
Show file tree
Hide file tree
Showing 43 changed files with 108 additions and 191 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ changes with their rationale when appropriate:

### v3.244.0 (uncut)
- [all] Upgrade some dependency versions.
- [all] [Breaking (if you're not using it right!)] Fix #397 - Fixed up Maven dependencies so that they are not bringing in runtime libraries.
- [http4k-core] - Add enum StringBiDiMapping #395 - H/T @goodhoko

### v3.243.0
Expand Down
101 changes: 48 additions & 53 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ buildscript {
classpath Libs.coveralls_gradle_plugin
classpath Libs.dokka_gradle_plugin
classpath Libs.com_jfrog_bintray_gradle_plugin
classpath Libs.nebula_provided_base_gradle_plugin
classpath Libs.openapi_generator_gradle_plugin
classpath Libs.kotlin_serialization
}
Expand All @@ -20,7 +19,6 @@ plugins {
id 'com.github.kt3k.coveralls' version "2.9.0"
id "com.jfrog.bintray" version "1.8.4"
id 'de.fayard.buildSrcVersions' version "0.7.0"
id 'nebula.provided-base' version "3.0.3"
id 'net.saliman.cobertura' version "3.0.0"
}

Expand All @@ -38,7 +36,6 @@ allprojects {
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'nebula.provided-base'
apply plugin: 'org.jetbrains.dokka'

jacoco {
Expand Down Expand Up @@ -105,16 +102,16 @@ allprojects {
asNode().appendNode('description', description)
asNode().appendNode('url', 'https://http4k.org')
asNode().appendNode('developers')
.appendNode('developer').appendNode('name', 'Ivan Sanchez').parent().appendNode('email', '[email protected]')
.parent().parent()
.appendNode('developer').appendNode('name', 'David Denton').parent().appendNode('email', '[email protected]')
.appendNode('developer').appendNode('name', 'Ivan Sanchez').parent().appendNode('email', '[email protected]')
.parent().parent()
.appendNode('developer').appendNode('name', 'David Denton').parent().appendNode('email', '[email protected]')
asNode().appendNode('scm').
appendNode('url', '[email protected]:http4k/' + archivesBaseName + '.git').parent().
appendNode('connection', 'scm:git:[email protected]:http4k/' + archivesBaseName + '.git').parent().
appendNode('developerConnection', 'scm:git:[email protected]:http4k/' + archivesBaseName + '.git')
appendNode('url', '[email protected]:http4k/' + archivesBaseName + '.git').parent().
appendNode('connection', 'scm:git:[email protected]:http4k/' + archivesBaseName + '.git').parent().
appendNode('developerConnection', 'scm:git:[email protected]:http4k/' + archivesBaseName + '.git')
asNode().appendNode('licenses').appendNode('license').
appendNode('name', 'Apache License, Version 2.0').parent().
appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.html')
appendNode('name', 'Apache License, Version 2.0').parent().
appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.html')
}
from components.java

Expand Down Expand Up @@ -192,47 +189,45 @@ task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
}

dependencies {
provided Libs.kotlin_stdlib_jdk8

provided project(":http4k-core")
provided project(":http4k-aws")
provided project(":http4k-client-apache")
provided project(":http4k-client-apache-async")
provided project(":http4k-client-jetty")
provided project(":http4k-client-okhttp")
provided project(":http4k-client-websocket")
provided project(":http4k-cloudnative")
provided project(":http4k-contract")
provided project(":http4k-format-argo")
provided project(":http4k-format-gson")
provided project(":http4k-format-jackson")
provided project(":http4k-format-jackson-xml")
provided project(":http4k-format-moshi")
provided project(":http4k-format-xml")
provided project(":http4k-incubator")
provided project(":http4k-jsonrpc")
provided project(":http4k-metrics-micrometer")
provided project(":http4k-multipart")
provided project(":http4k-resilience4j")
provided project(":http4k-security-oauth")
provided project(":http4k-server-apache")
provided project(":http4k-server-jetty")
provided project(":http4k-server-ktorcio")
provided project(":http4k-server-netty")
provided project(":http4k-server-undertow")
provided project(":http4k-serverless-lambda")
provided project(":http4k-template-dust")
provided project(":http4k-template-freemarker")
provided project(":http4k-template-handlebars")
provided project(":http4k-template-pebble")
provided project(":http4k-template-thymeleaf")
provided project(":http4k-template-dust")
provided project(":http4k-template-jade4j")
provided project(":http4k-testing-approval")
provided project(":http4k-testing-chaos")
provided project(":http4k-testing-hamkrest")
provided project(":http4k-testing-servirtium")
provided project(":http4k-testing-webdriver")
compile project(":http4k-core")
compile project(":http4k-aws")
compile project(":http4k-client-apache")
compile project(":http4k-client-apache-async")
compile project(":http4k-client-jetty")
compile project(":http4k-client-okhttp")
compile project(":http4k-client-websocket")
compile project(":http4k-cloudnative")
compile project(":http4k-contract")
compile project(":http4k-format-argo")
compile project(":http4k-format-gson")
compile project(":http4k-format-jackson")
compile project(":http4k-format-jackson-xml")
compile project(":http4k-format-moshi")
compile project(":http4k-format-xml")
compile project(":http4k-incubator")
compile project(":http4k-jsonrpc")
compile project(":http4k-metrics-micrometer")
compile project(":http4k-multipart")
compile project(":http4k-resilience4j")
compile project(":http4k-security-oauth")
compile project(":http4k-server-apache")
compile project(":http4k-server-jetty")
compile project(":http4k-server-ktorcio")
compile project(":http4k-server-netty")
compile project(":http4k-server-undertow")
compile project(":http4k-serverless-lambda")
compile project(":http4k-template-dust")
compile project(":http4k-template-freemarker")
compile project(":http4k-template-handlebars")
compile project(":http4k-template-pebble")
compile project(":http4k-template-thymeleaf")
compile project(":http4k-template-dust")
compile project(":http4k-template-jade4j")
compile project(":http4k-testing-approval")
compile project(":http4k-testing-chaos")
compile project(":http4k-testing-hamkrest")
compile project(":http4k-testing-servirtium")
compile project(":http4k-testing-webdriver")

testCompile Config.TestDependencies
testCompile project(path: ":http4k-testing-servirtium", configuration: 'testArtifacts')
Expand All @@ -256,7 +251,7 @@ dokka {

subProjects = subprojects.collect { i -> i.name }

configuration {
configuration {
includes = ['src/packages.md']
moduleName = "$rootProject.name"
jdkVersion = 9
Expand Down
4 changes: 0 additions & 4 deletions buildSrc/src/main/kotlin/Libs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ object Libs {
"net.saliman.cobertura:net.saliman.cobertura.gradle.plugin:" +
Versions.net_saliman_cobertura_gradle_plugin

const val nebula_provided_base_gradle_plugin: String =
"nebula.provided-base:nebula.provided-base.gradle.plugin:" +
Versions.nebula_provided_base_gradle_plugin

const val com_jfrog_bintray_gradle_plugin: String =
"com.jfrog.bintray:com.jfrog.bintray.gradle.plugin:" +
Versions.com_jfrog_bintray_gradle_plugin
Expand Down
2 changes: 0 additions & 2 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ object Versions {

const val net_saliman_cobertura_gradle_plugin: String = "3.0.0"

const val nebula_provided_base_gradle_plugin: String = "3.0.3" // available: "5.0.3"

const val com_jfrog_bintray_gradle_plugin: String = "1.8.5"

const val openapi_generator_gradle_plugin: String = "4.3.0"
Expand Down
3 changes: 1 addition & 2 deletions http4k-aws/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
description = 'Http4k AWS API client'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

testCompile project(path: ":http4k-core", configuration: 'testArtifacts')
testCompile project(":http4k-client-apache")
Expand Down
4 changes: 1 addition & 3 deletions http4k-client-apache-async/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
description = 'Http4k HTTP Client built on top of async apache httpclient'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile Libs.httpasyncclient

testCompile project(path: ":http4k-core", configuration: "testArtifacts")
testCompile Config.TestDependencies
}

4 changes: 1 addition & 3 deletions http4k-client-apache/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
description = 'Http4k HTTP Client built on top of apache-httpclient'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile Libs.httpclient // apache

testCompile project(path: ":http4k-core", configuration: "testArtifacts")
testCompile Config.TestDependencies
}

4 changes: 1 addition & 3 deletions http4k-client-jetty/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
description = 'HTTP Client built on top of jetty'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile Libs.jetty_client

testCompile project(path: ":http4k-core", configuration: "testArtifacts")
testCompile Config.TestDependencies
}

4 changes: 1 addition & 3 deletions http4k-client-okhttp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
description = 'HTTP Client built on top of okhttp'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile Libs.okhttp

testCompile project(path: ":http4k-core", configuration: "testArtifacts")
testCompile Config.TestDependencies
}

4 changes: 1 addition & 3 deletions http4k-client-websocket/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
description = 'HTTP Websocket Client'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile Libs.java_websocket

testCompile project(path: ":http4k-core", configuration: "testArtifacts")
testCompile project(path: ":http4k-server-jetty")
testCompile Config.TestDependencies
}

3 changes: 1 addition & 2 deletions http4k-cloudnative/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
description = 'Machinery for running Http4k apps in cloud-native environments'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

testCompile project(path: ":http4k-core", configuration: 'testArtifacts')
testCompile project(":http4k-testing-hamkrest")
Expand Down
10 changes: 5 additions & 5 deletions http4k-contract/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ description = 'http4k typesafe HTTP contracts and OpenApi support'
apply plugin: 'org.openapi.generator'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
provided project(":http4k-format-jackson")
provided project(":http4k-security-oauth")
compile project(":http4k-core")
implementation project(":http4k-security-oauth")
implementation project(":http4k-format-jackson")

compile Libs.kotlin_reflect

testCompile project(":http4k-format-jackson")
Expand Down Expand Up @@ -38,4 +38,4 @@ task generateOpenApi2Client(type: org.openapitools.generator.gradle.plugin.tasks

check.dependsOn("generateOpenApi3AutoClient")
check.dependsOn("generateOpenApi3Client")
check.dependsOn("generateOpenApi2Client")
check.dependsOn("generateOpenApi2Client")
7 changes: 3 additions & 4 deletions http4k-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
description = 'sane HTTP request API for Kotlin'
description = 'Dependency-lite Server as a Function in pure Kotlin'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided Libs.javax_servlet_api
compile Libs.kotlin_stdlib_jdk8
implementation Libs.javax_servlet_api

testCompile Config.TestDependencies
testCompile project(":http4k-client-apache")
Expand All @@ -11,4 +11,3 @@ dependencies {
testCompile project(":http4k-testing-hamkrest")
testCompile project(":http4k-server-jetty")
}

4 changes: 1 addition & 3 deletions http4k-format-argo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
description = 'Http4k Argo JSON support'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile Libs.argo

testCompile project(path: ":http4k-core", configuration: 'testArtifacts')
testCompile project(path: ":http4k-jsonrpc", configuration: 'testArtifacts')
testCompile Config.TestDependencies
}

6 changes: 1 addition & 5 deletions http4k-format-gson/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
description = 'Http4k GSON JSON support'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile Libs.gson

testCompile project(path: ":http4k-core", configuration: 'testArtifacts')
testCompile project(path: ":http4k-jsonrpc", configuration: 'testArtifacts')
testCompile Config.TestDependencies
}



5 changes: 2 additions & 3 deletions http4k-format-jackson-xml/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
description = 'Http4k XML support using Jackson as an underlying engine'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile project(":http4k-format-jackson")
compile Libs.jackson_dataformat_xml

testCompile project(path: ":http4k-core", configuration: 'testArtifacts')
testCompile Config.TestDependencies
}
}
5 changes: 2 additions & 3 deletions http4k-format-jackson/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
description = 'Http4k Jackson JSON/XML support'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile Libs.jackson_databind
compile Libs.jackson_module_kotlin
Expand All @@ -12,4 +11,4 @@ dependencies {
testCompile project(path: ":http4k-jsonrpc", configuration: 'testArtifacts')
testCompile project(":http4k-testing-approval")
testCompile Config.TestDependencies
}
}
3 changes: 1 addition & 2 deletions http4k-format-kotlinx-serialization/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ description = 'Http4k Kotlinx Serialization JSON support'
apply plugin: 'kotlinx-serialization'

dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile Libs.kotlinx_serialization_runtime

Expand Down
7 changes: 1 addition & 6 deletions http4k-format-moshi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
description = 'Http4k Moshi JSON support'


dependencies {
provided Libs.kotlin_stdlib_jdk8
provided project(":http4k-core")
compile project(":http4k-core")

compile Libs.moshi
compile Libs.moshi_kotlin

testCompile project(path: ":http4k-core", configuration: 'testArtifacts')
testCompile Config.TestDependencies
}



Loading

0 comments on commit 5b74282

Please sign in to comment.