expo-file-system 15.3.0 → 15.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 15.4.0 — 2023-06-13
14
+
15
+ ### 🎉 New features
16
+
17
+ - Migrated Android codebase to use Expo modules API. ([#22728](https://github.com/expo/expo/pull/22728) by [@alanhughes](https://github.com/alanjhughes))
18
+
19
+ ### 🐛 Bug fixes
20
+
21
+ - Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))
22
+
13
23
  ## 15.3.0 — 2023-05-08
14
24
 
15
25
  ### 🛠 Breaking changes
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '15.3.0'
6
+ version = '15.4.0'
7
7
 
8
8
  buildscript {
9
9
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -35,19 +35,11 @@ buildscript {
35
35
  }
36
36
  }
37
37
 
38
- // Creating sources with comments
39
- task androidSourcesJar(type: Jar) {
40
- classifier = 'sources'
41
- from android.sourceSets.main.java.srcDirs
42
- }
43
-
44
38
  afterEvaluate {
45
39
  publishing {
46
40
  publications {
47
41
  release(MavenPublication) {
48
42
  from components.release
49
- // Add additional sourcesJar to artifacts
50
- artifact(androidSourcesJar)
51
43
  }
52
44
  }
53
45
  repositories {
@@ -70,15 +62,21 @@ android {
70
62
  jvmTarget = JavaVersion.VERSION_11.majorVersion
71
63
  }
72
64
 
65
+ namespace "expo.modules.filesystem"
73
66
  defaultConfig {
74
67
  minSdkVersion safeExtGet("minSdkVersion", 21)
75
68
  targetSdkVersion safeExtGet("targetSdkVersion", 33)
76
69
  versionCode 30
77
- versionName "15.3.0"
70
+ versionName "15.4.0"
78
71
  }
79
72
  lintOptions {
80
73
  abortOnError false
81
74
  }
75
+ publishing {
76
+ singleVariant("release") {
77
+ withSourcesJar()
78
+ }
79
+ }
82
80
  }
83
81
 
84
82
  repositories {
@@ -1,6 +1,4 @@
1
- <manifest package="expo.modules.filesystem"
2
- xmlns:android="http://schemas.android.com/apk/res/android"
3
- xmlns:tools="http://schemas.android.com/tools">
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
4
2
  <uses-permission android:name="android.permission.INTERNET"/>
5
3
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
6
4
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
@@ -0,0 +1,48 @@
1
+ package expo.modules.filesystem
2
+
3
+ import android.net.Uri
4
+ import expo.modules.kotlin.exception.CodedException
5
+
6
+ internal class FileSystemOkHttpNullException :
7
+ CodedException("okHttpClient is null")
8
+
9
+ internal class FileSystemCannotReadDirectoryException(uri: Uri?) :
10
+ CodedException("Uri '$uri' doesn't exist or isn't a directory")
11
+
12
+ internal class FileSystemCannotCreateDirectoryException(uri: Uri?) :
13
+ CodedException(
14
+ uri?.let {
15
+ "Directory '$it' could not be created or already exists"
16
+ } ?: "Unknown error"
17
+ )
18
+
19
+ internal class FileSystemUnreadableDirectoryException(uri: String) :
20
+ CodedException("No readable files with the uri '$uri'. Please use other uri")
21
+
22
+ internal class FileSystemCannotCreateFileException(uri: Uri?) :
23
+ CodedException(
24
+ uri?.let {
25
+ "Provided uri '$it' is not pointing to a directory"
26
+ } ?: "Unknown error"
27
+ )
28
+
29
+ internal class FileSystemFileNotFoundException(uri: Uri?) :
30
+ CodedException("File '$uri' could not be deleted because it could not be found")
31
+
32
+ internal class FileSystemPendingPermissionsRequestException :
33
+ CodedException("You have an unfinished permission request")
34
+
35
+ internal class FileSystemCannotMoveFileException(fromUri: Uri, toUri: Uri) :
36
+ CodedException("File '$fromUri' could not be moved to '$toUri'")
37
+
38
+ internal class FileSystemUnsupportedSchemeException :
39
+ CodedException("Can't read Storage Access Framework directory, use StorageAccessFramework.readDirectoryAsync() instead")
40
+
41
+ internal class FileSystemCannotFindTaskException :
42
+ CodedException("Cannot find task")
43
+
44
+ internal class FileSystemCopyFailedException(uri: Uri?) :
45
+ CodedException("File '$uri' could not be copied because it could not be found")
46
+
47
+ internal class CookieHandlerNotFoundException :
48
+ CodedException("Failed to find CookieHandler")