From f0f998368b11fdcbe49347b2fbd619ded7eccda5 Mon Sep 17 00:00:00 2001 From: aminecmi Date: Fri, 6 Oct 2023 21:12:47 +0200 Subject: [PATCH] fix: Fixed ios build. --- .drone.yml | 49 ++++++++++--------- gradle.properties | 1 - settings.gradle.kts | 13 ----- .../rest/setupInsecureHTTPEngine.kt | 6 +++ .../rest/setupInsecureHTTPEngine.kt | 6 +++ 5 files changed, 38 insertions(+), 37 deletions(-) create mode 100644 shared/src/iosArm64Main/kotlin/bou/amine/apps/readerforselfossv2/rest/setupInsecureHTTPEngine.kt create mode 100644 shared/src/iosX64Main/kotlin/bou/amine/apps/readerforselfossv2/rest/setupInsecureHTTPEngine.kt diff --git a/.drone.yml b/.drone.yml index c21cbda..d27f790 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,35 +3,38 @@ type: docker name: test steps: + - name: Lint + failure: ignore + image: mingc/android-build-box:latest + commands: + - echo "---------------------------------------------------------" + - echo "Install linters..." + - curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.0.0/ktlint && chmod a+x ktlint && mv ktlint /usr/local/bin/ + - curl -sSLO https://github.com/detekt/detekt/releases/download/v1.23.1/detekt-cli-1.23.1.zip && unzip detekt-cli-1.23.1.zip + - echo "---------------------------------------------------------" + - echo "Linting..." + - ktlint || true + - echo "---------------------------------------------------------" + - echo "Detecting..." + - ./detekt-cli-1.23.1/bin/detekt-cli --all-rules || true + - echo "---------------------------------------------------------" + command_timeout: 1m - name: BuildAndTest image: mingc/android-build-box:latest commands: - echo "---------------------------------------------------------" - echo "Configure gradle..." - - mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\npushCache=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties + - mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties - echo "---------------------------------------------------------" - - echo "Building..." - - ./gradlew build -x test + - echo "Configure java..." + - . ~/.bash_profile + - jenv global 17.0 + - java --version + - date - echo "---------------------------------------------------------" - - echo "Testing..." + - echo "Building and testing..." + - ./gradlew build - echo "---------------------------------------------------------" - - ./gradlew koverMergedXmlReport - environment: - TZ: Europe/Paris - SONAR_HOST_URL: - from_secret: sonarScannerHostUrl - SONAR_LOGIN: - from_secret: sonarScannerLogin - - name: Analyse - image: kytay/sonar-node-plugin - settings: - sonar_host: - from_secret: sonarScannerHostUrl - sonar_token: - from_secret: sonarScannerLogin - use_node_version: 16.18.1 - sonar_debug: true - sonar_project_settings: ./sonar-project.properties trigger: event: - push @@ -107,10 +110,10 @@ steps: - git fetch --tags - echo "---------------------------------------------------------" - echo "Configure gradle..." - - mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=false\npushCache=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties + - mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties - echo "---------------------------------------------------------" - echo "Generate APK" - - ./gradlew :androidApp:assembleGithubConfigRelease -P pushCache=false + - ./gradlew :androidApp:assembleGithubConfigRelease - echo "---------------------------------------------------------" - echo "Get Key" - wget https://amine-louveau.fr/key diff --git a/gradle.properties b/gradle.properties index a7c8941..df0edb7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,4 +33,3 @@ org.gradle.parallel=true org.gradle.caching=true ignoreGitVersion=false kotlin.native.cacheKind.iosX64=none -pushCache=true diff --git a/settings.gradle.kts b/settings.gradle.kts index 5b7e8e0..2aaa979 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,3 @@ -val pushCache: String by settings - pluginManagement { repositories { // maven { url = uri("https://nexus.amine-louveau.fr/repository/maven-public/")} @@ -17,17 +15,6 @@ dependencyResolutionManagement { } } - -buildCache { - remote { - url = uri("http://18.0.0.7:3071/cache/") - isAllowInsecureProtocol = true - isAllowUntrustedServer = true - isUseExpectContinue = true - isPush = (pushCache == "true") - } -} - rootProject.name = "ReaderForSelfossV2" include(":androidApp") include(":shared") \ No newline at end of file diff --git a/shared/src/iosArm64Main/kotlin/bou/amine/apps/readerforselfossv2/rest/setupInsecureHTTPEngine.kt b/shared/src/iosArm64Main/kotlin/bou/amine/apps/readerforselfossv2/rest/setupInsecureHTTPEngine.kt new file mode 100644 index 0000000..530528c --- /dev/null +++ b/shared/src/iosArm64Main/kotlin/bou/amine/apps/readerforselfossv2/rest/setupInsecureHTTPEngine.kt @@ -0,0 +1,6 @@ +package bou.amine.apps.readerforselfossv2.rest + +import io.ktor.client.engine.cio.CIOEngineConfig + +actual fun setupInsecureHTTPEngine(config: CIOEngineConfig) { +} \ No newline at end of file diff --git a/shared/src/iosX64Main/kotlin/bou/amine/apps/readerforselfossv2/rest/setupInsecureHTTPEngine.kt b/shared/src/iosX64Main/kotlin/bou/amine/apps/readerforselfossv2/rest/setupInsecureHTTPEngine.kt new file mode 100644 index 0000000..530528c --- /dev/null +++ b/shared/src/iosX64Main/kotlin/bou/amine/apps/readerforselfossv2/rest/setupInsecureHTTPEngine.kt @@ -0,0 +1,6 @@ +package bou.amine.apps.readerforselfossv2.rest + +import io.ktor.client.engine.cio.CIOEngineConfig + +actual fun setupInsecureHTTPEngine(config: CIOEngineConfig) { +} \ No newline at end of file