| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- {
- "version": 1,
- "variables": {
- "VERSION": "$(go run github.com/sagernet/sing-box/cmd/internal/read_tag@latest)",
- "WORKSPACE_ROOT": "../../..",
- "DEPLOY_ANDROID": "${WORKSPACE_ROOT}/sing-box-for-android/app/libs",
- "DEPLOY_APPLE": "${WORKSPACE_ROOT}/sing-box-for-apple",
- "DEPLOY_WINDOWS": "${WORKSPACE_ROOT}/sing-box-for-windows/local-packages"
- },
- "packages": [
- {
- "id": "libbox",
- "path": ".",
- "java_package": "io.nekohasekai.libbox",
- "csharp_namespace": "SagerNet",
- "csharp_entrypoint": "Libbox",
- "apple_prefix": "Libbox"
- }
- ],
- "builds": [
- {
- "id": "android-main",
- "packages": ["libbox"],
- "default": {
- "tags": [
- "with_gvisor",
- "with_quic",
- "with_wireguard",
- "with_utls",
- "with_naive_outbound",
- "with_clash_api",
- "badlinkname",
- "tfogo_checklinkname0",
- "with_tailscale",
- "ts_omit_logtail",
- "ts_omit_ssh",
- "ts_omit_drive",
- "ts_omit_taildrop",
- "ts_omit_webclient",
- "ts_omit_doctor",
- "ts_omit_capture",
- "ts_omit_kube",
- "ts_omit_aws",
- "ts_omit_synology",
- "ts_omit_bird"
- ],
- "ldflags": "-X github.com/sagernet/sing-box/constant.Version=${VERSION} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -s -w -buildid= -checklinkname=0",
- "trimpath": true
- }
- },
- {
- "id": "android-legacy",
- "packages": ["libbox"],
- "default": {
- "tags": [
- "with_gvisor",
- "with_quic",
- "with_wireguard",
- "with_utls",
- "with_clash_api",
- "badlinkname",
- "tfogo_checklinkname0",
- "with_tailscale",
- "ts_omit_logtail",
- "ts_omit_ssh",
- "ts_omit_drive",
- "ts_omit_taildrop",
- "ts_omit_webclient",
- "ts_omit_doctor",
- "ts_omit_capture",
- "ts_omit_kube",
- "ts_omit_aws",
- "ts_omit_synology",
- "ts_omit_bird"
- ],
- "ldflags": "-X github.com/sagernet/sing-box/constant.Version=${VERSION} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -s -w -buildid= -checklinkname=0",
- "trimpath": true
- }
- },
- {
- "id": "apple",
- "packages": ["libbox"],
- "default": {
- "tags": [
- "with_gvisor",
- "with_quic",
- "with_wireguard",
- "with_utls",
- "with_naive_outbound",
- "with_clash_api",
- "badlinkname",
- "tfogo_checklinkname0",
- "with_dhcp",
- "grpcnotrace",
- "with_tailscale",
- "ts_omit_logtail",
- "ts_omit_ssh",
- "ts_omit_drive",
- "ts_omit_taildrop",
- "ts_omit_webclient",
- "ts_omit_doctor",
- "ts_omit_capture",
- "ts_omit_kube",
- "ts_omit_aws",
- "ts_omit_synology",
- "ts_omit_bird"
- ],
- "ldflags": "-X github.com/sagernet/sing-box/constant.Version=${VERSION} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -s -w -buildid= -checklinkname=0",
- "trimpath": true
- },
- "overrides": [
- {
- "match": { "os": "ios" },
- "tags_append": ["with_low_memory"]
- },
- {
- "match": { "os": "tvos" },
- "tags_append": ["with_low_memory"]
- }
- ]
- },
- {
- "id": "windows",
- "packages": ["libbox"],
- "default": {
- "tags": [
- "with_gvisor",
- "with_quic",
- "with_wireguard",
- "with_utls",
- "with_naive_outbound",
- "with_purego",
- "with_clash_api",
- "badlinkname",
- "tfogo_checklinkname0",
- "with_tailscale",
- "ts_omit_logtail",
- "ts_omit_ssh",
- "ts_omit_drive",
- "ts_omit_taildrop",
- "ts_omit_webclient",
- "ts_omit_doctor",
- "ts_omit_capture",
- "ts_omit_kube",
- "ts_omit_aws",
- "ts_omit_synology",
- "ts_omit_bird"
- ],
- "ldflags": "-X github.com/sagernet/sing-box/constant.Version=${VERSION} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -s -w -buildid= -checklinkname=0",
- "trimpath": true
- }
- }
- ],
- "platforms": [
- {
- "type": "android",
- "build": "android-main",
- "min_sdk": 23,
- "ndk_version": "28.0.13004108",
- "lib_name": "box",
- "languages": [{ "type": "java" }],
- "artifacts": [
- {
- "type": "aar",
- "output_path": "libbox.aar",
- "execute_after": [
- "if [ -d \"${DEPLOY_ANDROID}\" ]; then",
- " rm -f \"${DEPLOY_ANDROID}/$$(basename \"${OUTPUT_PATH}\")\"",
- " mv \"${OUTPUT_PATH}\" \"${DEPLOY_ANDROID}/\"",
- "fi"
- ]
- }
- ]
- },
- {
- "type": "android",
- "build": "android-legacy",
- "min_sdk": 21,
- "ndk_version": "28.0.13004108",
- "lib_name": "box",
- "languages": [{ "type": "java" }],
- "artifacts": [
- {
- "type": "aar",
- "output_path": "libbox-legacy.aar",
- "execute_after": [
- "if [ -d \"${DEPLOY_ANDROID}\" ]; then",
- " rm -f \"${DEPLOY_ANDROID}/$$(basename \"${OUTPUT_PATH}\")\"",
- " mv \"${OUTPUT_PATH}\" \"${DEPLOY_ANDROID}/\"",
- "fi"
- ]
- }
- ]
- },
- {
- "type": "apple",
- "build": "apple",
- "targets": [
- "ios/arm64",
- "ios/simulator/arm64",
- "ios/simulator/amd64",
- "tvos/arm64",
- "tvos/simulator/arm64",
- "tvos/simulator/amd64",
- "macos/arm64",
- "macos/amd64"
- ],
- "languages": [{ "type": "objc" }],
- "artifacts": [
- {
- "type": "xcframework",
- "module_name": "Libbox",
- "execute_after": [
- "if [ -d \"${DEPLOY_APPLE}\" ]; then",
- " rm -rf \"${DEPLOY_APPLE}/${MODULE_NAME}.xcframework\"",
- " mv \"${OUTPUT_PATH}\" \"${DEPLOY_APPLE}/\"",
- "fi"
- ]
- }
- ]
- },
- {
- "type": "csharp",
- "build": "windows",
- "targets": [
- "windows/amd64"
- ],
- "languages": [{ "type": "csharp" }],
- "artifacts": [
- {
- "type": "nuget",
- "package_id": "SagerNet.Libbox",
- "package_version": "0.0.0-local",
- "execute_after": {
- "windows": [
- "$$deployPath = '${DEPLOY_WINDOWS}'",
- "if (Test-Path $$deployPath) {",
- " Remove-Item \"$$deployPath\\${PACKAGE_ID}.*.nupkg\" -ErrorAction SilentlyContinue",
- " Move-Item -Force '${OUTPUT_PATH}' \"$$deployPath\\\"",
- " $$cachePath = if ($$env:NUGET_PACKAGES) { $$env:NUGET_PACKAGES } else { \"$$env:USERPROFILE\\.nuget\\packages\" }",
- " Remove-Item -Recurse -Force \"$$cachePath\\sagernet.libbox\\${PACKAGE_VERSION}\" -ErrorAction SilentlyContinue",
- "}"
- ],
- "default": [
- "if [ -d \"${DEPLOY_WINDOWS}\" ]; then",
- " rm -f \"${DEPLOY_WINDOWS}/${PACKAGE_ID}.*.nupkg\"",
- " mv \"${OUTPUT_PATH}\" \"${DEPLOY_WINDOWS}/\"",
- " cache_path=\"$${NUGET_PACKAGES:-$${HOME}/.nuget/packages}\"",
- " rm -rf \"$${cache_path}/sagernet.libbox/${PACKAGE_VERSION}\"",
- "fi"
- ]
- }
- }
- ]
- }
- ]
- }
|