mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-04 06:32:59 +00:00
desktop: remove nanohttpd submodule
This commit is contained in:
1 parent
754a638046
commit
fbb1e074b6
9 files changed
+3
-78
No files matched your search
@@ -241,8 +241,6 @@ jobs:
|
||||
- name: Checkout Code
|
||||
if: matrix.should_run == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup swap
|
||||
if: matrix.ghc == '8.10.7' && matrix.should_run == true
|
||||
@@ -920,8 +918,6 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Point Command Line Tools SDK to Xcode SDK
|
||||
shell: bash
|
||||
@@ -1272,8 +1268,6 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Prepare build
|
||||
id: prepare
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[submodule "apps/multiplatform/external/nanohttpd/upstream"]
|
||||
path = apps/multiplatform/external/nanohttpd/upstream
|
||||
url = https://github.com/NanoHttpd/nanohttpd
|
||||
@@ -16,7 +16,6 @@ android/build
|
||||
android/release
|
||||
common/build
|
||||
desktop/build
|
||||
external/nanohttpd/build
|
||||
release
|
||||
|
||||
# Generated SimpleX assets
|
||||
|
||||
@@ -6,15 +6,6 @@ This is a guide to contributing to the develop of the SimpleX android and deskto
|
||||
|
||||
This is the **Kotlin Multiplatform (KMP)** mobile and desktop client for SimpleX Chat, sharing code between Android and Desktop (JVM) platforms using Compose Multiplatform for UI.
|
||||
|
||||
## Setup
|
||||
|
||||
The desktop app builds nanohttpd from a submodule, Android does not use it. Before building
|
||||
the desktop app on a fresh checkout:
|
||||
|
||||
```bash
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
## Build Commands
|
||||
|
||||
```bash
|
||||
|
||||
@@ -154,7 +154,6 @@ kotlin {
|
||||
implementation("org.slf4j:slf4j-simple:2.0.12")
|
||||
implementation("uk.co.caprica:vlcj:4.8.3")
|
||||
implementation("net.java.dev.jna:jna:5.14.0")
|
||||
implementation(project(":external:nanohttpd"))
|
||||
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
||||
implementation("dev.onvoid.webrtc:webrtc-java:$webrtcJavaVersion")
|
||||
implementation("dev.onvoid.webrtc:webrtc-java:$webrtcJavaVersion:$webrtcJavaNativeClassifier")
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
}
|
||||
|
||||
// Built from the upstream submodule pinned at efb2ebf85a2b06f7c508aba9eaad5377e3a01e81, because
|
||||
// upstream never released the org.nanohttpd packages and JitPack no longer serves or builds that
|
||||
// commit. Only the core and websocket modules are used, the samples are not.
|
||||
group = "org.nanohttpd"
|
||||
version = "efb2ebf"
|
||||
|
||||
val upstream = layout.projectDirectory.dir("upstream")
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
setSrcDirs(listOf(upstream.dir("core/src/main/java"), upstream.dir("websocket/src/main/java")))
|
||||
exclude("org/nanohttpd/samples/**")
|
||||
}
|
||||
resources.setSrcDirs(listOf(upstream.dir("core/src/main/resources")))
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
val jvmVersion = JavaVersion.toVersion(providers.gradleProperty("kotlin.jvm.target").get())
|
||||
sourceCompatibility = jvmVersion
|
||||
targetCompatibility = jvmVersion
|
||||
}
|
||||
|
||||
val upstreamSources = sourceSets.main.get().java.matching { include("org/nanohttpd/**") }
|
||||
|
||||
// compileJava and jar silently succeed without the sources, so the check needs its own task.
|
||||
// It cannot run during configuration, Android builds must work without the submodule.
|
||||
val checkUpstreamSources by tasks.registering {
|
||||
doFirst {
|
||||
if (upstreamSources.isEmpty) {
|
||||
throw GradleException("nanohttpd sources are missing, run: git submodule update --init --recursive")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.compileJava {
|
||||
dependsOn(checkUpstreamSources)
|
||||
}
|
||||
|
||||
// Without this the jar records the build machine's timestamps, file order and file modes,
|
||||
// which makes the desktop packages unreproducible
|
||||
tasks.jar {
|
||||
isPreserveFileTimestamps = false
|
||||
isReproducibleFileOrder = true
|
||||
filePermissions { unix("644") }
|
||||
dirPermissions { unix("755") }
|
||||
}
|
||||
-1
Submodule apps/multiplatform/external/nanohttpd/upstream deleted from efb2ebf85a.
@@ -18,4 +18,4 @@ pluginManagement {
|
||||
|
||||
rootProject.name = "app"
|
||||
|
||||
include(":android", ":desktop", ":common", ":external:nanohttpd")
|
||||
include(":android", ":desktop", ":common")
|
||||
@@ -36,8 +36,7 @@ mkdir -p "${init_dir}/${TAG}-${repo_name}/from-source" "${init_dir}/${TAG}-${rep
|
||||
|
||||
git -C "${tempdir}" clone "${repo}.git" &&\
|
||||
cd "${tempdir}/${repo_name}" &&\
|
||||
git checkout "${TAG}" &&\
|
||||
git submodule update --init --recursive
|
||||
git checkout "${TAG}"
|
||||
|
||||
oses="22.04@sha256:5c8b2c0a6c745bc177669abfaa716b4bc57d58e2ea3882fb5da67f4d59e3dda5 24.04@sha256:98ff7968124952e719a8a69bb3cccdd217f5fe758108ac4f21ad22e1df44d237"
|
||||
|
||||
@@ -148,9 +147,8 @@ for os_pair in ${oses}; do
|
||||
-t "${container_name}" \
|
||||
sh -c 'rm -rf ./dist-newstyle ./apps/multiplatform'
|
||||
|
||||
# Also restore git to previous state + re-initialize submodules
|
||||
# Also restore git to previous state
|
||||
git reset --hard && git clean -dfx
|
||||
git submodule update --init --recursive
|
||||
|
||||
# Stop containers, delete images
|
||||
docker stop "${container_name}"
|
||||
|
||||
Reference in new issue
Block a user