Skip to content

Commit c17a4f9

Browse files
authored
Merge pull request #955 from supabase-community/move-plugins
(Re)move plugins from the repository
2 parents a0bcb0f + 9d3f42c commit c17a4f9

File tree

57 files changed

+22
-4529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+22
-4529
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,16 @@ __For versions below 3.0.0:__
120120

121121
### Plugins
122122

123-
- [Apollo GraphQL integration](/plugins/ApolloGraphQL) - Creates an [Apollo GraphQL Client](https://github.com/apollographql/apollo-kotlin) for interacting with the Supabase API.
124-
- [Compose Auth](/plugins/ComposeAuth) - Provides easy Native Google & Apple Auth for Compose Multiplatform targets.
125-
- [Compose Auth UI](/plugins/ComposeAuthUI) - Provides UI Components for Compose Multiplatform.
126-
- [Coil Integration](/plugins/CoilIntegration) - Provides a [Coil2](https://github.com/coil-kt/coil) Integration for displaying images stored in Supabase Storage. Only supports Android.
127-
- [Coil3 Integration](/plugins/Coil3Integration) - Provides a [Coil3](https://github.com/coil-kt/coil) Integration for displaying images stored in Supabase Storage. Supports all Compose Multiplatform targets.
128-
- *[Compose-ImageLoader Integration](/plugins/ImageLoaderIntegration) - Deprecated. Use Coil 3 or create your own integration*
123+
There are several plugins available to extend the functionality of supabase-kt. They can be installed in the `createSupabaseClient` function.
124+
125+
Some highlights include:
126+
127+
- [Apollo GraphQL integration](https://github.com/supabase-community/supabase-kt-plugins/tree/main/ApolloGraphQL) - Creates an [Apollo GraphQL Client](https://github.com/apollographql/apollo-kotlin) for interacting with the Supabase API.
128+
- [Compose Auth](https://github.com/supabase-community/supabase-kt-plugins/tree/main/ComposeAuth) - Provides easy Native Google & Apple Auth for Compose Multiplatform targets.
129+
- [Compose Auth UI](https://github.com/supabase-community/supabase-kt-plugins/tree/main/ComposeAuthUI) - Provides UI Components for Compose Multiplatform.
130+
- [Coil3 Integration](https://github.com/supabase-community/supabase-kt-plugins/tree/main/Coil3Integration) - Provides a [Coil3](https://github.com/coil-kt/coil) Integration for displaying images stored in Supabase Storage. Supports all Compose Multiplatform targets.
131+
132+
For more information, checkout [supabase-kt-plugins](https://github.com/supabase-community/supabase-kt-plugins).
129133

130134
### Miscellaneous
131135
- [Supabase Edge Functions Kotlin](https://github.com/manriif/supabase-edge-functions-kt) - Build, serve and deploy Supabase Edge Functions with Kotlin and Gradle.

buildSrc/src/main/kotlin/Modules.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ import org.jetbrains.compose.desktop.DesktopExtension
22
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
33
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
44

5-
enum class SupabaseModule(val module: String) {
5+
enum class SupabaseModule(val module: String, val extern: Boolean = false) {
66
SUPABASE("supabase-kt"),
77
AUTH("auth-kt"),
88
STORAGE("storage-kt"),
99
REALTIME("realtime-kt"),
1010
FUNCTIONS("functions-kt"),
1111
POSTGREST("postgrest-kt"),
12-
COMPOSE_AUTH("plugins:compose-auth"),
13-
COMPOSE_AUTH_UI("plugins:compose-auth-ui"),
1412
}
1513

1614
fun KotlinDependencyHandler.addModules(vararg modules: SupabaseModule) {

plugins/ApolloGraphQL/README.md

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,3 @@
11
# Supabase-kt ApolloGraphQL
22

3-
Extends Supabase-kt with an Apollo GraphQL Client.
4-
5-
Supported targets:
6-
7-
| Target | **JVM** | **Android** | **JS** | **Wasm** | **Apple** |
8-
|--------|---------|-------------|--------|----------|-----------|
9-
| Status ||||||
10-
11-
<details>
12-
13-
<summary>In-depth Kotlin targets</summary>
14-
15-
**JS**: Browser, NodeJS
16-
17-
**Wasm**: wasm-js
18-
19-
**Apple:**
20-
21-
- iOS: iosArm64, iosSimulatorArm64, iosX64
22-
23-
- tvOS: tvosArm64, tvosX64, tvosSimulatorArm64
24-
25-
- watchOS: watchosArm64, watchosX64, watchosSimulatorArm64
26-
27-
- MacOS: macosX64, macosArm64
28-
29-
</details>
30-
31-
# Installation
32-
33-
Newest version: [![](https://img.shields.io/github/release/supabase-community/supabase-kt?label=)](https://github.com/supabase-community/supabase-kt/releases)
34-
35-
```kotlin
36-
dependencies {
37-
implementation("io.github.jan-tennert.supabase:apollo-graphql:VERSION")
38-
}
39-
```
40-
41-
Install the plugin in your SupabaseClient. See the [documentation](https://supabase.com/docs/reference/kotlin/initializing) for more information
42-
43-
```kotlin
44-
val supabase = createSupabaseClient(
45-
supabaseUrl = "https://id.supabase.co",
46-
supabaseKey = "apikey"
47-
) {
48-
//...
49-
50-
install(GraphQL) {
51-
apolloConfiguration {
52-
// settings
53-
}
54-
}
55-
56-
}
57-
```
58-
59-
# Usage
60-
61-
The plugin automatically creates an Apollo Client with the corresponding headers for Authorization depending on your session.
62-
63-
To access the client, you can use the `apolloClient` property of the `GraphQL` plugin instance.
64-
65-
```kotlin
66-
supabase.graphql.apolloClient.query(YourQuery()).execute().data //execute a query
67-
```
68-
69-
To learn about how to use Apollo GraphQL, see [Apollo Kotlin](https://github.com/apollographql/apollo-kotlin#getting-started).
3+
Moved to [new repository](https://github.com/supabase-community/supabase-kt-plugins/tree/main/ApolloGraphQL)

plugins/Coil3Integration/README.md

Lines changed: 1 addition & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,3 @@
11
# Supabase-kt Coil 3 Integration
22

3-
Extends supabase-kt with a Coil3 integration for image loading.
4-
**Requires supabase-kt `3.0.0` or higher.**
5-
6-
Current supported Coil3 version: `3.0.0-rc01`
7-
8-
Supported targets:
9-
10-
| Target | **JVM** | **Android** | **JS** | **Wasm** | **iOS** |
11-
|--------|---------|-------------|--------|----------|---------|
12-
| Status ||||||
13-
14-
<details>
15-
16-
<summary>In-depth Kotlin targets</summary>
17-
18-
**JS**: Browser
19-
20-
**Wasm**: wasm-js
21-
22-
**iOS**: iosArm64, iosSimulatorArm64, iosX64
23-
24-
</details>
25-
26-
# Installation
27-
28-
Newest version: [![](https://img.shields.io/github/release/supabase-community/supabase-kt?label=)](https://github.com/supabase-community/supabase-kt/releases)
29-
30-
```kotlin
31-
dependencies {
32-
implementation("io.github.jan-tennert.supabase:coil3-integration:VERSION")
33-
}
34-
```
35-
36-
Install plugin in main SupabaseClient. See the [documentation](https://supabase.com/docs/reference/kotlin/initializing) for more information
37-
```kotlin
38-
val client = createSupabaseClient(
39-
supabaseUrl = "https://id.supabase.co",
40-
supabaseKey = "apikey"
41-
) {
42-
//...
43-
install(Storage) {
44-
//your config
45-
}
46-
install(Coil3Integration)
47-
}
48-
```
49-
50-
If you don't have a coil-network artifact in your dependencies, you will need to add it. See the [Coil documentation](https://coil-kt.github.io/coil/upgrading_to_coil3/#network-images) for more information.
51-
52-
# Usage
53-
54-
### Add Supabase Fetcher to Coil
55-
56-
Create a new ImageLoader with the Supabase Fetcher and a [network fetcher](https://coil-kt.github.io/coil/upgrading_to_coil3/#network-images).
57-
58-
```kotlin
59-
ImageLoader.Builder(context)
60-
.components {
61-
add(supabaseClient.coil3)
62-
//You also need the add the network fetcher factory if you don't have it already
63-
//Depending on the network artifact you added, this will be different
64-
add(KtorNetworkFetcherFactory())
65-
}
66-
.build()
67-
```
68-
69-
You can also replace the default Coil Image Loader in your application.
70-
For Compose Multiplatform Applications using the `coil-compose` dependency, you can use the `setSingletonImageLoaderFactory` composable function:
71-
```kotlin
72-
setSingletonImageLoaderFactory { platformContext ->
73-
ImageLoader.Builder(platformContext)
74-
.components {
75-
add(supabaseClient.coil3)
76-
//Your network fetcher factory
77-
add(KtorNetworkFetcherFactory())
78-
}
79-
.build()
80-
}
81-
```
82-
You call this composable before any `Image` composable is used. Presumably in your `Root` composable.
83-
84-
See the [Coil documentation](https://coil-kt.github.io/coil/getting_started/#image-loaders) for more information.
85-
86-
### Display images from Supabase Storage
87-
88-
You can easily create an image request like this:
89-
90-
```kotlin
91-
val request = ImageRequest.Builder(context)
92-
.data(authenticatedStorageItem("icons", "profile.png")) //for non-public buckets
93-
.build()
94-
```
95-
96-
Or if you are using [Compose Multiplatform](https://coil-kt.github.io/coil/compose/):
97-
98-
```kotlin
99-
AsyncImage(
100-
model = publicStorageItem("icons", "profile.png"), //for public buckets
101-
contentDescription = null,
102-
)
103-
```
104-
105-
The Coil integration will automatically add the Authorization header to the request if the bucket is not public.
3+
Moved to [new repository](https://github.com/supabase-community/supabase-kt-plugins/tree/main/Coil3Integration)

plugins/Coil3Integration/build.gradle.kts

Lines changed: 0 additions & 27 deletions
This file was deleted.

plugins/Coil3Integration/src/androidMain/AndroidManifest.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

plugins/Coil3Integration/src/commonMain/kotlin/io/github/jan/supabase/coil/Coil3Integration.kt

Lines changed: 0 additions & 61 deletions
This file was deleted.

plugins/Coil3Integration/src/commonMain/kotlin/io/github/jan/supabase/coil/SupabaseStorageFetcher.kt

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)