mirror of
https://github.com/square/okhttp.git
synced 2025-07-29 17:41:17 +03:00
Switch to Vanniktech for Maven publishing (#6929)
* Switch to Vanniktech for Maven publishing Steal configuration from Okio, which already works nicely. * Update mockwebserver-junit5/build.gradle.kts Co-authored-by: Benoît Quenaudon <bquenaudon@squareup.com> Co-authored-by: Benoît Quenaudon <bquenaudon@squareup.com>
This commit is contained in:
@ -58,7 +58,7 @@ dependencies {
|
|||||||
androidTestImplementation(Dependencies.bouncycastle)
|
androidTestImplementation(Dependencies.bouncycastle)
|
||||||
androidTestImplementation(Dependencies.bouncycastletls)
|
androidTestImplementation(Dependencies.bouncycastletls)
|
||||||
androidTestImplementation(Dependencies.conscryptAndroid)
|
androidTestImplementation(Dependencies.conscryptAndroid)
|
||||||
androidTestImplementation(project(":mockwebserver-junit5"))
|
androidTestImplementation(project(":mockwebserver3-junit5"))
|
||||||
androidTestImplementation(project(":okhttp-brotli"))
|
androidTestImplementation(project(":okhttp-brotli"))
|
||||||
androidTestImplementation(project(":okhttp-dnsoverhttps"))
|
androidTestImplementation(project(":okhttp-dnsoverhttps"))
|
||||||
androidTestImplementation(project(":okhttp-logging-interceptor"))
|
androidTestImplementation(project(":okhttp-logging-interceptor"))
|
||||||
|
136
build.gradle.kts
136
build.gradle.kts
@ -1,4 +1,5 @@
|
|||||||
import java.net.URI
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
|
import com.vanniktech.maven.publish.SonatypeHost
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||||
import org.jetbrains.dokka.gradle.DokkaTask
|
import org.jetbrains.dokka.gradle.DokkaTask
|
||||||
@ -18,6 +19,7 @@ buildscript {
|
|||||||
classpath(Dependencies.animalsnifferPlugin)
|
classpath(Dependencies.animalsnifferPlugin)
|
||||||
classpath(Dependencies.errorpronePlugin)
|
classpath(Dependencies.errorpronePlugin)
|
||||||
classpath(Dependencies.spotlessPlugin)
|
classpath(Dependencies.spotlessPlugin)
|
||||||
|
classpath(Dependencies.vanniktechPublishPlugin)
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -27,9 +29,10 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply(plugin = "com.vanniktech.maven.publish.base")
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "com.squareup.okhttp3"
|
group = "com.squareup.okhttp3"
|
||||||
project.ext["artifactId"] = project.name.publishedArtifactId()
|
|
||||||
version = "5.0.0-SNAPSHOT"
|
version = "5.0.0-SNAPSHOT"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -176,101 +179,60 @@ subprojects {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
|
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8.toString()
|
targetCompatibility = JavaVersion.VERSION_1_8.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<DokkaTask> {
|
|
||||||
configuration {
|
|
||||||
reportUndocumented = false
|
|
||||||
skipDeprecated = true
|
|
||||||
jdkVersion = 8
|
|
||||||
perPackageOption {
|
|
||||||
prefix = "okhttp3.internal"
|
|
||||||
suppress = true
|
|
||||||
}
|
|
||||||
perPackageOption {
|
|
||||||
prefix = "mockwebserver3.internal"
|
|
||||||
suppress = true
|
|
||||||
}
|
|
||||||
if (project.file("Module.md").exists()) {
|
|
||||||
includes = listOf("Module.md")
|
|
||||||
}
|
|
||||||
externalDocumentationLink {
|
|
||||||
url = URL("https://square.github.io/okio/2.x/okio/")
|
|
||||||
packageListUrl = URL("https://square.github.io/okio/2.x/okio/package-list")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Configure publishing and signing for published Java and JavaPlatform subprojects. */
|
/** Configure publishing and signing for published Java and JavaPlatform subprojects. */
|
||||||
subprojects {
|
subprojects {
|
||||||
val project = this@subprojects
|
tasks.withType<DokkaTask>().configureEach {
|
||||||
if (project.ext.get("artifactId") == null) return@subprojects
|
dokkaSourceSets.configureEach {
|
||||||
val bom = project.ext["artifactId"] == "okhttp-bom"
|
reportUndocumented.set(false)
|
||||||
|
skipDeprecated.set(true)
|
||||||
if (bom) {
|
jdkVersion.set(8)
|
||||||
apply(plugin = "java-platform")
|
perPackageOption {
|
||||||
}
|
matchingRegex.set("okhttp3\\.internal.*")
|
||||||
|
suppress.set(true)
|
||||||
apply(plugin = "maven-publish")
|
|
||||||
apply(plugin = "signing")
|
|
||||||
|
|
||||||
configure<PublishingExtension> {
|
|
||||||
if (!bom) {
|
|
||||||
configure<JavaPluginExtension> {
|
|
||||||
withJavadocJar()
|
|
||||||
withSourcesJar()
|
|
||||||
}
|
}
|
||||||
}
|
perPackageOption {
|
||||||
|
matchingRegex.set("mockwebserver3\\.internal.*")
|
||||||
publications {
|
suppress.set(true)
|
||||||
create<MavenPublication>("maven") {
|
|
||||||
groupId = project.group.toString()
|
|
||||||
artifactId = project.ext["artifactId"].toString()
|
|
||||||
version = project.version.toString()
|
|
||||||
if (bom) {
|
|
||||||
from(components["javaPlatform"])
|
|
||||||
} else {
|
|
||||||
from(components["java"])
|
|
||||||
}
|
|
||||||
pom {
|
|
||||||
name.set(project.name)
|
|
||||||
description.set("Square’s meticulous HTTP client for Java and Kotlin.")
|
|
||||||
url.set("https://square.github.io/okhttp/")
|
|
||||||
licenses {
|
|
||||||
license {
|
|
||||||
name.set("The Apache Software License, Version 2.0")
|
|
||||||
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
name.set("Square, Inc.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
scm {
|
|
||||||
connection.set("scm:git:https://github.com/square/okhttp.git")
|
|
||||||
developerConnection.set("scm:git:ssh://git@github.com/square/okhttp.git")
|
|
||||||
url.set("https://github.com/square/okhttp")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
if (project.file("Module.md").exists()) {
|
||||||
|
includes.from(project.file("Module.md"))
|
||||||
repositories {
|
}
|
||||||
maven {
|
externalDocumentationLink {
|
||||||
name = "mavencentral"
|
url.set(URL("https://square.github.io/okio/2.x/okio/"))
|
||||||
url = URI("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
packageListUrl.set(URL("https://square.github.io/okio/2.x/okio/package-list"))
|
||||||
credentials {
|
|
||||||
username = System.getenv("SONATYPE_NEXUS_USERNAME")
|
|
||||||
password = System.getenv("SONATYPE_NEXUS_PASSWORD")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val publishing = extensions.getByType<PublishingExtension>()
|
plugins.withId("com.vanniktech.maven.publish.base") {
|
||||||
configure<SigningExtension> {
|
configure<MavenPublishBaseExtension> {
|
||||||
sign(publishing.publications["maven"])
|
publishToMavenCentral(SonatypeHost.DEFAULT)
|
||||||
|
signAllPublications()
|
||||||
|
pom {
|
||||||
|
name.set(project.name)
|
||||||
|
description.set("Square’s meticulous HTTP client for Java and Kotlin.")
|
||||||
|
url.set("https://square.github.io/okhttp/")
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name.set("The Apache Software License, Version 2.0")
|
||||||
|
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||||
|
distribution.set("repo")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
connection.set("scm:git:https://github.com/square/okhttp.git")
|
||||||
|
developerConnection.set("scm:git:ssh://git@github.com/square/okhttp.git")
|
||||||
|
url.set("https://github.com/square/okhttp")
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
name.set("Square, Inc.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,29 +20,9 @@ import org.gradle.api.Project
|
|||||||
import org.gradle.api.plugins.ExtensionAware
|
import org.gradle.api.plugins.ExtensionAware
|
||||||
import org.gradle.api.tasks.SourceSetContainer
|
import org.gradle.api.tasks.SourceSetContainer
|
||||||
import org.gradle.kotlin.dsl.apply
|
import org.gradle.kotlin.dsl.apply
|
||||||
import org.gradle.kotlin.dsl.extra
|
|
||||||
import org.gradle.kotlin.dsl.get
|
import org.gradle.kotlin.dsl.get
|
||||||
import org.gradle.kotlin.dsl.withConvention
|
import org.gradle.kotlin.dsl.withConvention
|
||||||
|
|
||||||
fun String.publishedArtifactId(): String? {
|
|
||||||
return when (this) {
|
|
||||||
"okhttp-logging-interceptor" -> "logging-interceptor"
|
|
||||||
"mockwebserver" -> "mockwebserver3"
|
|
||||||
"mockwebserver-junit4" -> "mockwebserver3-junit4"
|
|
||||||
"mockwebserver-junit5" -> "mockwebserver3-junit5"
|
|
||||||
"mockwebserver-deprecated" -> "mockwebserver"
|
|
||||||
"okcurl",
|
|
||||||
"okhttp",
|
|
||||||
"okhttp-bom",
|
|
||||||
"okhttp-brotli",
|
|
||||||
"okhttp-dnsoverhttps",
|
|
||||||
"okhttp-sse",
|
|
||||||
"okhttp-tls",
|
|
||||||
"okhttp-urlconnection" -> this
|
|
||||||
else -> null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Project.applyOsgi(vararg bndProperties: String) {
|
fun Project.applyOsgi(vararg bndProperties: String) {
|
||||||
apply(plugin = "biz.aQute.bnd.builder")
|
apply(plugin = "biz.aQute.bnd.builder")
|
||||||
sourceSets.create("osgi")
|
sourceSets.create("osgi")
|
||||||
@ -59,11 +39,10 @@ fun Project.applyOsgi(vararg bndProperties: String) {
|
|||||||
*/
|
*/
|
||||||
fun Project.baselineJar(version: String = "3.14.1"): File? {
|
fun Project.baselineJar(version: String = "3.14.1"): File? {
|
||||||
val originalGroup = group
|
val originalGroup = group
|
||||||
val artifactId = extra["artifactId"]
|
|
||||||
return try {
|
return try {
|
||||||
val jarFile = "$artifactId-${version}.jar"
|
val jarFile = "$name-$version.jar"
|
||||||
group = "virtual_group_for_japicmp"
|
group = "virtual_group_for_japicmp"
|
||||||
val dependency = dependencies.create("$originalGroup:$artifactId:$version@jar")
|
val dependency = dependencies.create("$originalGroup:$name:$version@jar")
|
||||||
configurations.detachedConfiguration(dependency).files.find { (it.name == jarFile) }
|
configurations.detachedConfiguration(dependency).files.find { (it.name == jarFile) }
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
null
|
null
|
||||||
|
@ -29,7 +29,7 @@ object Versions {
|
|||||||
|
|
||||||
object Dependencies {
|
object Dependencies {
|
||||||
const val kotlinPlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
|
const val kotlinPlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
|
||||||
const val dokkaPlugin = "org.jetbrains.dokka:dokka-gradle-plugin:0.10.1"
|
const val dokkaPlugin = "org.jetbrains.dokka:dokka-gradle-plugin:1.5.31"
|
||||||
const val androidPlugin = "com.android.tools.build:gradle:7.0.2"
|
const val androidPlugin = "com.android.tools.build:gradle:7.0.2"
|
||||||
const val androidJunit5Plugin = "de.mannodermaus.gradle.plugins:android-junit5:1.8.0.0"
|
const val androidJunit5Plugin = "de.mannodermaus.gradle.plugins:android-junit5:1.8.0.0"
|
||||||
const val graalPlugin = "gradle.plugin.com.palantir.graal:gradle-graal:0.9.0"
|
const val graalPlugin = "gradle.plugin.com.palantir.graal:gradle-graal:0.9.0"
|
||||||
@ -39,6 +39,7 @@ object Dependencies {
|
|||||||
const val animalsnifferPlugin = "ru.vyarus:gradle-animalsniffer-plugin:1.5.3"
|
const val animalsnifferPlugin = "ru.vyarus:gradle-animalsniffer-plugin:1.5.3"
|
||||||
const val errorpronePlugin = "net.ltgt.gradle:gradle-errorprone-plugin:2.0.2"
|
const val errorpronePlugin = "net.ltgt.gradle:gradle-errorprone-plugin:2.0.2"
|
||||||
const val spotlessPlugin = "com.diffplug.spotless:spotless-plugin-gradle:5.15.0"
|
const val spotlessPlugin = "com.diffplug.spotless:spotless-plugin-gradle:5.15.0"
|
||||||
|
const val vanniktechPublishPlugin = "com.vanniktech:gradle-maven-publish-plugin:0.18.0"
|
||||||
|
|
||||||
const val android = "org.robolectric:android-all:12-robolectric-7732740"
|
const val android = "org.robolectric:android-all:12-robolectric-7732740"
|
||||||
const val animalSniffer = "org.codehaus.mojo:animal-sniffer-annotations:1.20"
|
const val animalSniffer = "org.codehaus.mojo:animal-sniffer-annotations:1.20"
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
import me.champeau.gradle.japicmp.JapicmpTask
|
import me.champeau.gradle.japicmp.JapicmpTask
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("me.champeau.gradle.japicmp")
|
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
|
id("me.champeau.gradle.japicmp")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
@ -15,7 +19,7 @@ tasks.jar {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(project(":okhttp"))
|
api(project(":okhttp"))
|
||||||
api(project(":mockwebserver"))
|
api(project(":mockwebserver3"))
|
||||||
api(Dependencies.junit)
|
api(Dependencies.junit)
|
||||||
|
|
||||||
testImplementation(project(":okhttp-testing-support"))
|
testImplementation(project(":okhttp-testing-support"))
|
||||||
@ -23,13 +27,6 @@ dependencies {
|
|||||||
testImplementation(Dependencies.assertj)
|
testImplementation(Dependencies.assertj)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
tasks.dokka {
|
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register<JapicmpTask>("japicmp") {
|
tasks.register<JapicmpTask>("japicmp") {
|
||||||
dependsOn("jar")
|
dependsOn("jar")
|
||||||
oldClasspath = files(project.baselineJar())
|
oldClasspath = files(project.baselineJar())
|
||||||
@ -49,3 +46,8 @@ tasks.register<JapicmpTask>("japicmp") {
|
|||||||
"okhttp3.mockwebserver.QueueDispatcher"
|
"okhttp3.mockwebserver.QueueDispatcher"
|
||||||
)
|
)
|
||||||
}.let(tasks.check::dependsOn)
|
}.let(tasks.check::dependsOn)
|
||||||
|
|
||||||
|
|
||||||
|
configure<MavenPublishBaseExtension> {
|
||||||
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
|
}
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
@ -10,15 +15,12 @@ tasks.jar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(project(":mockwebserver"))
|
api(project(":mockwebserver3"))
|
||||||
api(Dependencies.junit)
|
api(Dependencies.junit)
|
||||||
|
|
||||||
testImplementation(Dependencies.assertj)
|
testImplementation(Dependencies.assertj)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
configure<MavenPublishBaseExtension> {
|
||||||
tasks.dokka {
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
@ -16,7 +21,7 @@ tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(project(":mockwebserver"))
|
api(project(":mockwebserver3"))
|
||||||
api(Dependencies.junit5Api)
|
api(Dependencies.junit5Api)
|
||||||
compileOnly(Dependencies.animalSniffer)
|
compileOnly(Dependencies.animalSniffer)
|
||||||
|
|
||||||
@ -25,9 +30,6 @@ dependencies {
|
|||||||
testImplementation(Dependencies.kotlinJunit5)
|
testImplementation(Dependencies.kotlinJunit5)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
configure<MavenPublishBaseExtension> {
|
||||||
tasks.dokka {
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
@ -13,14 +19,11 @@ dependencies {
|
|||||||
|
|
||||||
testImplementation(project(":okhttp-testing-support"))
|
testImplementation(project(":okhttp-testing-support"))
|
||||||
testImplementation(project(":okhttp-tls"))
|
testImplementation(project(":okhttp-tls"))
|
||||||
testRuntimeOnly(project(":mockwebserver-junit5"))
|
testRuntimeOnly(project(":mockwebserver3-junit5"))
|
||||||
testImplementation(Dependencies.junit)
|
testImplementation(Dependencies.junit)
|
||||||
testImplementation(Dependencies.assertj)
|
testImplementation(Dependencies.assertj)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
configure<MavenPublishBaseExtension> {
|
||||||
tasks.dokka {
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,11 @@ dependencies {
|
|||||||
implementation(project(":okhttp-testing-support"))
|
implementation(project(":okhttp-testing-support"))
|
||||||
implementation(project(":okhttp-tls"))
|
implementation(project(":okhttp-tls"))
|
||||||
implementation(Dependencies.assertj)
|
implementation(Dependencies.assertj)
|
||||||
|
implementation(project(":mockwebserver3"))
|
||||||
implementation(project(":mockwebserver"))
|
implementation(project(":mockwebserver"))
|
||||||
implementation(project(":mockwebserver-deprecated"))
|
|
||||||
implementation(project(":okhttp-urlconnection"))
|
implementation(project(":okhttp-urlconnection"))
|
||||||
implementation(project(":mockwebserver-junit4"))
|
implementation(project(":mockwebserver3-junit4"))
|
||||||
implementation(project(":mockwebserver-junit5"))
|
implementation(project(":mockwebserver3-junit5"))
|
||||||
implementation(Dependencies.bndResolve)
|
implementation(Dependencies.bndResolve)
|
||||||
implementation(Dependencies.junit5Api)
|
implementation(Dependencies.junit5Api)
|
||||||
implementation(Dependencies.junit5JupiterParams)
|
implementation(Dependencies.junit5JupiterParams)
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
import java.nio.charset.StandardCharsets
|
import java.nio.charset.StandardCharsets
|
||||||
import org.apache.tools.ant.taskdefs.condition.Os
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
kotlin("kapt")
|
kotlin("kapt")
|
||||||
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
id("com.palantir.graal")
|
id("com.palantir.graal")
|
||||||
id("com.github.johnrengelman.shadow")
|
id("com.github.johnrengelman.shadow")
|
||||||
}
|
}
|
||||||
@ -23,19 +28,9 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Copy>("copyResourcesTemplates") {
|
|
||||||
from("src/main/resources-templates")
|
|
||||||
into("$buildDir/generated/resources-templates")
|
|
||||||
expand("projectVersion" to "${project.version}")
|
|
||||||
filteringCharset = StandardCharsets.UTF_8.toString()
|
|
||||||
}.let {
|
|
||||||
tasks.processResources.dependsOn(it)
|
|
||||||
tasks.named("sourcesJar").dependsOn(it)
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(project(":okhttp"))
|
api(project(":okhttp"))
|
||||||
api(project(":okhttp-logging-interceptor"))
|
api(project(":logging-interceptor"))
|
||||||
implementation(Dependencies.picocli)
|
implementation(Dependencies.picocli)
|
||||||
implementation(Dependencies.guava)
|
implementation(Dependencies.guava)
|
||||||
|
|
||||||
@ -66,3 +61,17 @@ graal {
|
|||||||
windowsVsVarsPath("C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat")
|
windowsVsVarsPath("C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure<MavenPublishBaseExtension> {
|
||||||
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<Copy>("copyResourcesTemplates") {
|
||||||
|
from("src/main/resources-templates")
|
||||||
|
into("$buildDir/generated/resources-templates")
|
||||||
|
expand("projectVersion" to "${project.version}")
|
||||||
|
filteringCharset = StandardCharsets.UTF_8.toString()
|
||||||
|
}.let {
|
||||||
|
tasks.processResources.dependsOn(it)
|
||||||
|
tasks.named("javaSourcesJar").dependsOn(it)
|
||||||
|
}
|
||||||
|
@ -1,14 +1,20 @@
|
|||||||
plugins {
|
plugins {
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
id("java-platform")
|
id("java-platform")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
constraints {
|
constraints {
|
||||||
project.rootProject.subprojects.forEach { subproject ->
|
project.rootProject.subprojects.forEach { subproject ->
|
||||||
val artifactId = subproject.name.publishedArtifactId()
|
if (subproject.name != "okhttp-bom") {
|
||||||
if (artifactId != null && artifactId != "okhttp-bom") {
|
|
||||||
api(subproject)
|
api(subproject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extensions.configure<PublishingExtension> {
|
||||||
|
publications.create("maven", MavenPublication::class) {
|
||||||
|
from(project.components.getByName("javaPlatform"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
}
|
}
|
||||||
|
|
||||||
project.applyOsgi(
|
project.applyOsgi(
|
||||||
@ -20,9 +25,6 @@ dependencies {
|
|||||||
testImplementation(Dependencies.assertj)
|
testImplementation(Dependencies.assertj)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
configure<MavenPublishBaseExtension> {
|
||||||
tasks.dokka {
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
}
|
}
|
||||||
|
|
||||||
project.applyOsgi(
|
project.applyOsgi(
|
||||||
@ -14,17 +19,14 @@ dependencies {
|
|||||||
compileOnly(Dependencies.jsr305)
|
compileOnly(Dependencies.jsr305)
|
||||||
|
|
||||||
testImplementation(project(":okhttp-testing-support"))
|
testImplementation(project(":okhttp-testing-support"))
|
||||||
testImplementation(project(":mockwebserver-deprecated"))
|
testImplementation(project(":mockwebserver"))
|
||||||
testImplementation(project(":mockwebserver-junit5"))
|
testImplementation(project(":mockwebserver3-junit5"))
|
||||||
testImplementation(Dependencies.okioFakeFileSystem)
|
testImplementation(Dependencies.okioFakeFileSystem)
|
||||||
testImplementation(Dependencies.conscrypt)
|
testImplementation(Dependencies.conscrypt)
|
||||||
testImplementation(Dependencies.junit)
|
testImplementation(Dependencies.junit)
|
||||||
testImplementation(Dependencies.assertj)
|
testImplementation(Dependencies.assertj)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
configure<MavenPublishBaseExtension> {
|
||||||
tasks.dokka {
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ dependencies {
|
|||||||
testImplementation(Dependencies.moshi)
|
testImplementation(Dependencies.moshi)
|
||||||
testImplementation(project(":okhttp"))
|
testImplementation(project(":okhttp"))
|
||||||
testImplementation(project(":okhttp-testing-support"))
|
testImplementation(project(":okhttp-testing-support"))
|
||||||
testImplementation(project(":mockwebserver-deprecated"))
|
testImplementation(project(":mockwebserver"))
|
||||||
testImplementation(Dependencies.junit)
|
testImplementation(Dependencies.junit)
|
||||||
testImplementation(Dependencies.assertj)
|
testImplementation(Dependencies.assertj)
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
import me.champeau.gradle.japicmp.JapicmpTask
|
import me.champeau.gradle.japicmp.JapicmpTask
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
id("me.champeau.gradle.japicmp")
|
id("me.champeau.gradle.japicmp")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,20 +23,13 @@ dependencies {
|
|||||||
|
|
||||||
testCompileOnly(Dependencies.jsr305)
|
testCompileOnly(Dependencies.jsr305)
|
||||||
testImplementation(Dependencies.junit)
|
testImplementation(Dependencies.junit)
|
||||||
testImplementation(project(":mockwebserver"))
|
testImplementation(project(":mockwebserver3"))
|
||||||
testImplementation(project(":mockwebserver-junit5"))
|
testImplementation(project(":mockwebserver3-junit5"))
|
||||||
testImplementation(project(":okhttp-testing-support"))
|
testImplementation(project(":okhttp-testing-support"))
|
||||||
testImplementation(project(":okhttp-tls"))
|
testImplementation(project(":okhttp-tls"))
|
||||||
testImplementation(Dependencies.assertj)
|
testImplementation(Dependencies.assertj)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
tasks.dokka {
|
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register<JapicmpTask>("japicmp") {
|
tasks.register<JapicmpTask>("japicmp") {
|
||||||
dependsOn("jar")
|
dependsOn("jar")
|
||||||
oldClasspath = files(project.baselineJar())
|
oldClasspath = files(project.baselineJar())
|
||||||
@ -43,3 +40,7 @@ tasks.register<JapicmpTask>("japicmp") {
|
|||||||
isIgnoreMissingClasses = true
|
isIgnoreMissingClasses = true
|
||||||
isIncludeSynthetic = true
|
isIncludeSynthetic = true
|
||||||
}.let(tasks.check::dependsOn)
|
}.let(tasks.check::dependsOn)
|
||||||
|
|
||||||
|
configure<MavenPublishBaseExtension> {
|
||||||
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
|
}
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
import me.champeau.gradle.japicmp.JapicmpTask
|
import me.champeau.gradle.japicmp.JapicmpTask
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
id("me.champeau.gradle.japicmp")
|
id("me.champeau.gradle.japicmp")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18,20 +22,13 @@ dependencies {
|
|||||||
compileOnly(Dependencies.jsr305)
|
compileOnly(Dependencies.jsr305)
|
||||||
|
|
||||||
testImplementation(project(":okhttp-testing-support"))
|
testImplementation(project(":okhttp-testing-support"))
|
||||||
testImplementation(project(":mockwebserver"))
|
testImplementation(project(":mockwebserver3"))
|
||||||
testImplementation(project(":mockwebserver-junit5"))
|
testImplementation(project(":mockwebserver3-junit5"))
|
||||||
testImplementation(Dependencies.junit)
|
testImplementation(Dependencies.junit)
|
||||||
testImplementation(Dependencies.assertj)
|
testImplementation(Dependencies.assertj)
|
||||||
testCompileOnly(Dependencies.jsr305)
|
testCompileOnly(Dependencies.jsr305)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
tasks.dokka {
|
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register<JapicmpTask>("japicmp") {
|
tasks.register<JapicmpTask>("japicmp") {
|
||||||
dependsOn("jar")
|
dependsOn("jar")
|
||||||
oldClasspath = files(project.baselineJar())
|
oldClasspath = files(project.baselineJar())
|
||||||
@ -45,3 +42,7 @@ tasks.register<JapicmpTask>("japicmp") {
|
|||||||
"okhttp3.internal.sse"
|
"okhttp3.internal.sse"
|
||||||
)
|
)
|
||||||
}.let(tasks.check::dependsOn)
|
}.let(tasks.check::dependsOn)
|
||||||
|
|
||||||
|
configure<MavenPublishBaseExtension> {
|
||||||
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
|
}
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
import me.champeau.gradle.japicmp.JapicmpTask
|
import me.champeau.gradle.japicmp.JapicmpTask
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
id("ru.vyarus.animalsniffer")
|
id("com.vanniktech.maven.publish.base")
|
||||||
id("me.champeau.gradle.japicmp")
|
id("me.champeau.gradle.japicmp")
|
||||||
|
id("ru.vyarus.animalsniffer")
|
||||||
}
|
}
|
||||||
|
|
||||||
project.applyOsgi(
|
project.applyOsgi(
|
||||||
@ -21,18 +25,11 @@ dependencies {
|
|||||||
compileOnly(Dependencies.animalSniffer)
|
compileOnly(Dependencies.animalSniffer)
|
||||||
|
|
||||||
testImplementation(project(":okhttp-testing-support"))
|
testImplementation(project(":okhttp-testing-support"))
|
||||||
testImplementation(project(":mockwebserver-junit5"))
|
testImplementation(project(":mockwebserver3-junit5"))
|
||||||
testImplementation(Dependencies.junit)
|
testImplementation(Dependencies.junit)
|
||||||
testImplementation(Dependencies.assertj)
|
testImplementation(Dependencies.assertj)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
tasks.dokka {
|
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
animalsniffer {
|
animalsniffer {
|
||||||
// InsecureExtendedTrustManager (API 24+)
|
// InsecureExtendedTrustManager (API 24+)
|
||||||
ignore = listOf("javax.net.ssl.X509ExtendedTrustManager")
|
ignore = listOf("javax.net.ssl.X509ExtendedTrustManager")
|
||||||
@ -51,3 +48,7 @@ tasks.register<JapicmpTask>("japicmp") {
|
|||||||
"okhttp3.tls.internal"
|
"okhttp3.tls.internal"
|
||||||
)
|
)
|
||||||
}.let(tasks.check::dependsOn)
|
}.let(tasks.check::dependsOn)
|
||||||
|
|
||||||
|
configure<MavenPublishBaseExtension> {
|
||||||
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
|
}
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
import me.champeau.gradle.japicmp.JapicmpTask
|
import me.champeau.gradle.japicmp.JapicmpTask
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
id("me.champeau.gradle.japicmp")
|
id("me.champeau.gradle.japicmp")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,18 +27,11 @@ dependencies {
|
|||||||
|
|
||||||
testImplementation(project(":okhttp-testing-support"))
|
testImplementation(project(":okhttp-testing-support"))
|
||||||
testImplementation(project(":okhttp-tls"))
|
testImplementation(project(":okhttp-tls"))
|
||||||
testImplementation(project(":mockwebserver-deprecated"))
|
testImplementation(project(":mockwebserver"))
|
||||||
testImplementation(Dependencies.junit)
|
testImplementation(Dependencies.junit)
|
||||||
testImplementation(Dependencies.assertj)
|
testImplementation(Dependencies.assertj)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
tasks.dokka {
|
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register<JapicmpTask>("japicmp") {
|
tasks.register<JapicmpTask>("japicmp") {
|
||||||
dependsOn("jar")
|
dependsOn("jar")
|
||||||
oldClasspath = files(project.baselineJar())
|
oldClasspath = files(project.baselineJar())
|
||||||
@ -45,3 +42,8 @@ tasks.register<JapicmpTask>("japicmp") {
|
|||||||
isIgnoreMissingClasses = true
|
isIgnoreMissingClasses = true
|
||||||
isIncludeSynthetic = true
|
isIncludeSynthetic = true
|
||||||
}.let(tasks.check::dependsOn)
|
}.let(tasks.check::dependsOn)
|
||||||
|
|
||||||
|
|
||||||
|
configure<MavenPublishBaseExtension> {
|
||||||
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
|
}
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||||
|
import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
import com.vanniktech.maven.publish.KotlinJvm
|
||||||
|
import com.vanniktech.maven.publish.MavenPublishBaseExtension
|
||||||
import java.nio.charset.StandardCharsets
|
import java.nio.charset.StandardCharsets
|
||||||
import me.champeau.gradle.japicmp.JapicmpTask
|
import me.champeau.gradle.japicmp.JapicmpTask
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("me.champeau.gradle.japicmp")
|
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
|
id("com.vanniktech.maven.publish.base")
|
||||||
|
id("me.champeau.gradle.japicmp")
|
||||||
}
|
}
|
||||||
|
|
||||||
project.applyOsgi(
|
project.applyOsgi(
|
||||||
@ -56,16 +60,6 @@ normalization {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Copy>("copyJavaTemplates") {
|
|
||||||
from("src/main/java-templates")
|
|
||||||
into("$buildDir/generated/sources/java-templates/java/main")
|
|
||||||
expand("projectVersion" to project.version)
|
|
||||||
filteringCharset = StandardCharsets.UTF_8.toString()
|
|
||||||
}.let {
|
|
||||||
tasks.compileKotlin.dependsOn(it)
|
|
||||||
tasks.named("sourcesJar").dependsOn(it)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Expose OSGi jars to the test environment.
|
// Expose OSGi jars to the test environment.
|
||||||
configurations {
|
configurations {
|
||||||
create("osgiTestDeploy")
|
create("osgiTestDeploy")
|
||||||
@ -95,11 +89,11 @@ dependencies {
|
|||||||
testImplementation(project(":okhttp-testing-support"))
|
testImplementation(project(":okhttp-testing-support"))
|
||||||
testImplementation(project(":okhttp-tls"))
|
testImplementation(project(":okhttp-tls"))
|
||||||
testImplementation(project(":okhttp-urlconnection"))
|
testImplementation(project(":okhttp-urlconnection"))
|
||||||
|
testImplementation(project(":mockwebserver3"))
|
||||||
|
testImplementation(project(":mockwebserver3-junit4"))
|
||||||
|
testImplementation(project(":mockwebserver3-junit5"))
|
||||||
testImplementation(project(":mockwebserver"))
|
testImplementation(project(":mockwebserver"))
|
||||||
testImplementation(project(":mockwebserver-junit4"))
|
testImplementation(project(":logging-interceptor"))
|
||||||
testImplementation(project(":mockwebserver-junit5"))
|
|
||||||
testImplementation(project(":mockwebserver-deprecated"))
|
|
||||||
testImplementation(project(":okhttp-logging-interceptor"))
|
|
||||||
testImplementation(project(":okhttp-brotli"))
|
testImplementation(project(":okhttp-brotli"))
|
||||||
testImplementation(project(":okhttp-dnsoverhttps"))
|
testImplementation(project(":okhttp-dnsoverhttps"))
|
||||||
testImplementation(project(":okhttp-sse"))
|
testImplementation(project(":okhttp-sse"))
|
||||||
@ -116,13 +110,6 @@ dependencies {
|
|||||||
testCompileOnly(Dependencies.jsr305)
|
testCompileOnly(Dependencies.jsr305)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
tasks.dokka {
|
|
||||||
outputDirectory = "$rootDir/docs/4.x"
|
|
||||||
outputFormat = "gfm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register<JapicmpTask>("japicmp") {
|
tasks.register<JapicmpTask>("japicmp") {
|
||||||
dependsOn("jar")
|
dependsOn("jar")
|
||||||
oldClasspath = files(project.baselineJar())
|
oldClasspath = files(project.baselineJar())
|
||||||
@ -185,3 +172,18 @@ tasks.register<JapicmpTask>("japicmp") {
|
|||||||
"okhttp3.Request\$Builder#delete()",
|
"okhttp3.Request\$Builder#delete()",
|
||||||
)
|
)
|
||||||
}.let(tasks.check::dependsOn)
|
}.let(tasks.check::dependsOn)
|
||||||
|
|
||||||
|
configure<MavenPublishBaseExtension> {
|
||||||
|
configure(KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGfm")))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<Copy>("copyJavaTemplates") {
|
||||||
|
from("src/main/java-templates")
|
||||||
|
into("$buildDir/generated/sources/java-templates/java/main")
|
||||||
|
expand("projectVersion" to project.version)
|
||||||
|
filteringCharset = StandardCharsets.UTF_8.toString()
|
||||||
|
}.let {
|
||||||
|
tasks.compileKotlin.dependsOn(it)
|
||||||
|
tasks.named("javaSourcesJar").dependsOn(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ plugins {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation(project(":okhttp"))
|
testImplementation(project(":okhttp"))
|
||||||
testImplementation(project(":mockwebserver"))
|
testImplementation(project(":mockwebserver3"))
|
||||||
testRuntimeOnly(project(":mockwebserver-junit5"))
|
testRuntimeOnly(project(":mockwebserver3-junit5"))
|
||||||
testImplementation(project(":okhttp-tls"))
|
testImplementation(project(":okhttp-tls"))
|
||||||
testImplementation(project(":okhttp-testing-support"))
|
testImplementation(project(":okhttp-testing-support"))
|
||||||
testImplementation(Dependencies.httpclient5)
|
testImplementation(Dependencies.httpclient5)
|
||||||
|
@ -5,7 +5,7 @@ plugins {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":okhttp"))
|
implementation(project(":okhttp"))
|
||||||
implementation(project(":mockwebserver-deprecated"))
|
implementation(project(":mockwebserver"))
|
||||||
implementation(project(":okhttp-testing-support"))
|
implementation(project(":okhttp-testing-support"))
|
||||||
implementation(project(":okhttp-tls"))
|
implementation(project(":okhttp-tls"))
|
||||||
implementation(Dependencies.animalSniffer)
|
implementation(Dependencies.animalSniffer)
|
||||||
|
@ -3,6 +3,6 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":mockwebserver-deprecated"))
|
implementation(project(":mockwebserver"))
|
||||||
implementation(Dependencies.moshi)
|
implementation(Dependencies.moshi)
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ tasks.jar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":mockwebserver-deprecated"))
|
implementation(project(":mockwebserver"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.shadowJar {
|
tasks.shadowJar {
|
||||||
|
@ -4,6 +4,6 @@ plugins {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":okhttp"))
|
implementation(project(":okhttp"))
|
||||||
implementation(project(":mockwebserver-deprecated"))
|
implementation(project(":mockwebserver"))
|
||||||
implementation(Dependencies.jnrUnixsocket)
|
implementation(Dependencies.jnrUnixsocket)
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
rootProject.name = "okhttp-parent"
|
rootProject.name = "okhttp-parent"
|
||||||
|
|
||||||
include(":mockwebserver")
|
include(":mockwebserver")
|
||||||
|
project(":mockwebserver").name = "mockwebserver3"
|
||||||
include(":mockwebserver-deprecated")
|
include(":mockwebserver-deprecated")
|
||||||
|
project(":mockwebserver-deprecated").name = "mockwebserver"
|
||||||
include(":mockwebserver-junit4")
|
include(":mockwebserver-junit4")
|
||||||
|
project(":mockwebserver-junit4").name = "mockwebserver3-junit4"
|
||||||
include(":mockwebserver-junit5")
|
include(":mockwebserver-junit5")
|
||||||
|
project(":mockwebserver-junit5").name = "mockwebserver3-junit5"
|
||||||
|
|
||||||
val androidBuild: String? by settings
|
val androidBuild: String? by settings
|
||||||
val graalBuild: String? by settings
|
val graalBuild: String? by settings
|
||||||
@ -24,6 +28,7 @@ include(":okhttp-brotli")
|
|||||||
include(":okhttp-dnsoverhttps")
|
include(":okhttp-dnsoverhttps")
|
||||||
include(":okhttp-hpacktests")
|
include(":okhttp-hpacktests")
|
||||||
include(":okhttp-logging-interceptor")
|
include(":okhttp-logging-interceptor")
|
||||||
|
project(":okhttp-logging-interceptor").name = "logging-interceptor"
|
||||||
include(":okhttp-sse")
|
include(":okhttp-sse")
|
||||||
include(":okhttp-testing-support")
|
include(":okhttp-testing-support")
|
||||||
include(":okhttp-tls")
|
include(":okhttp-tls")
|
||||||
|
Reference in New Issue
Block a user