1
0
mirror of https://github.com/square/okhttp.git synced 2025-04-19 07:42:15 +03:00

Support codespaces (#8347)

* Create devcontainer.json

* vs code extensions

* simplify

* Switch to java image

* Check for android

* Check for android
This commit is contained in:
Yuri Schimke 2024-04-14 15:24:05 +01:00 committed by GitHub
parent 2b1100eae2
commit 348a9510a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,19 @@
{
"image": "mcr.microsoft.com/devcontainers/java:17-bookworm",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "17"
}
},
"customizations": {
"vscode": {
"settings": {
"java.server.launchMode": "Standard"
},
"extensions": [
"vscjava.vscode-java-pack",
"vscjava.vscode-gradle"
]
}
}
}

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"java.compile.nullAnalysis.mode": "automatic"
}

View File

@ -1,3 +1,5 @@
import java.util.Properties
rootProject.name = "okhttp-parent"
plugins {
@ -51,7 +53,15 @@ include(":container-tests")
project(":okhttp-logging-interceptor").name = "logging-interceptor"
if (!isKnownBrokenIntelliJ()) {
val androidHome = System.getenv("ANDROID_HOME")
val localProperties = Properties().apply {
val file = File("local.properties")
if (file.exists()) {
load(file.inputStream())
}
}
val sdkDir = localProperties.getProperty("sdk.dir")
if ((androidHome != null || sdkDir != null) && !isKnownBrokenIntelliJ()) {
include(":okhttp-android")
include(":android-test")
include(":android-test-app")