-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8efea04
commit f58b201
Showing
18 changed files
with
1,515 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
# Created by https://www.toptal.com/developers/gitignore/api/macos,kotlin,androidstudio | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,kotlin,androidstudio | ||
|
||
### Kotlin ### | ||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
replay_pid* | ||
|
||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### macOS Patch ### | ||
# iCloud generated files | ||
*.icloud | ||
|
||
### AndroidStudio ### | ||
# Covers files to be ignored for android development using Android Studio. | ||
|
||
# Built application files | ||
*.apk | ||
*.ap_ | ||
*.aab | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
|
||
# Generated files | ||
bin/ | ||
gen/ | ||
out/ | ||
|
||
# Gradle files | ||
.gradle | ||
.gradle/ | ||
build/ | ||
|
||
# Signing files | ||
.signing/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard/ | ||
|
||
# Log Files | ||
|
||
# Android Studio | ||
/*/build/ | ||
/*/local.properties | ||
/*/out | ||
/*/*/build | ||
/*/*/production | ||
captures/ | ||
.navigation/ | ||
*.ipr | ||
*~ | ||
*.swp | ||
|
||
# Keystore files | ||
*.jks | ||
*.keystore | ||
|
||
# Google Services (e.g. APIs or Firebase) | ||
# google-services.json | ||
|
||
# Android Patch | ||
gen-external-apklibs | ||
|
||
# External native build folder generated in Android Studio 2.2 and later | ||
.externalNativeBuild | ||
|
||
# NDK | ||
obj/ | ||
|
||
# IntelliJ IDEA | ||
*.iml | ||
*.iws | ||
/out/ | ||
|
||
# User-specific configurations | ||
.idea/caches/ | ||
.idea/libraries/ | ||
.idea/shelf/ | ||
.idea/workspace.xml | ||
.idea/tasks.xml | ||
.idea/.name | ||
.idea/compiler.xml | ||
.idea/copyright/profiles_settings.xml | ||
.idea/encodings.xml | ||
.idea/misc.xml | ||
.idea/modules.xml | ||
.idea/scopes/scope_settings.xml | ||
.idea/dictionaries | ||
.idea/vcs.xml | ||
.idea/jsLibraryMappings.xml | ||
.idea/datasources.xml | ||
.idea/dataSources.ids | ||
.idea/sqlDataSources.xml | ||
.idea/dynamic.xml | ||
.idea/uiDesigner.xml | ||
.idea/assetWizardSettings.xml | ||
.idea/gradle.xml | ||
.idea/jarRepositories.xml | ||
.idea/navEditor.xml | ||
|
||
# Legacy Eclipse project files | ||
.classpath | ||
.project | ||
.cproject | ||
.settings/ | ||
|
||
# Mobile Tools for Java (J2ME) | ||
|
||
# Package Files # | ||
|
||
# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml) | ||
|
||
## Plugin-specific files: | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Mongo Explorer plugin | ||
.idea/mongoSettings.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
### AndroidStudio Patch ### | ||
|
||
!/gradle/wrapper/gradle-wrapper.jar | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/macos,kotlin,androidstudio | ||
|
||
.kotlin | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
|
||
plugins { | ||
alias(libs.plugins.kotlinMultiplatform) | ||
alias(libs.plugins.androidLibrary) | ||
alias(libs.plugins.kotlinSerialization) | ||
} | ||
|
||
kotlin { | ||
// every class, method, property must declare there visibility | ||
explicitApi() | ||
|
||
androidTarget { | ||
// https://youtrack.jetbrains.com/issue/KT-66448 | ||
@OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
compilerOptions { | ||
jvmTarget.set(JvmTarget.JVM_1_8) | ||
} | ||
} | ||
jvm() | ||
js { | ||
nodejs() | ||
} | ||
iosX64() | ||
iosArm64() | ||
iosSimulatorArm64() | ||
macosX64() | ||
macosArm64() | ||
watchosArm32() | ||
watchosArm64() | ||
watchosSimulatorArm64() | ||
watchosX64() | ||
tvosArm64() | ||
tvosSimulatorArm64() | ||
tvosX64() | ||
mingwX64() | ||
linuxX64() | ||
linuxArm64() | ||
|
||
sourceSets { | ||
commonMain.dependencies { | ||
implementation(libs.kotlin.serialization) | ||
implementation(libs.kotlin.coroutines) | ||
implementation(libs.ktor.client.core) | ||
implementation(libs.okio) | ||
} | ||
jsMain.dependencies { | ||
api(libs.okio.nodefilesystem) | ||
} | ||
jsTest.dependencies { | ||
api(libs.okio.nodefilesystem) | ||
} | ||
commonTest.dependencies { | ||
implementation(libs.kotlin.test) | ||
implementation(libs.okio.fakefilesystem) | ||
implementation(libs.ktor.client.mock) | ||
implementation(libs.kotlin.coroutines.test) | ||
implementation(libs.ktor.client.logging) | ||
} | ||
androidNativeTest.dependencies { | ||
implementation(libs.slf4j.android) | ||
} | ||
jvmTest.dependencies { | ||
implementation(libs.slf4j.jvm) | ||
} | ||
} | ||
} | ||
|
||
android { | ||
namespace = "fr.frankois944.ktorfilecaching" | ||
compileSdk = 34 | ||
defaultConfig { | ||
minSdk = 24 | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...eCaching/src/androidMain/kotlin/fr/frankois944/ktorfilecaching/KtorFileCaching.android.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package fr.frankois944.ktorfilecaching | ||
|
||
import okio.FileSystem | ||
|
||
internal actual fun filesystem(): FileSystem = FileSystem.SYSTEM |
Oops, something went wrong.