Skip to content

(Re)move plugins from the repository #955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions buildSrc/src/main/kotlin/Modules.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import org.jetbrains.compose.desktop.DesktopExtension
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler

enum class SupabaseModule(val module: String) {
enum class SupabaseModule(val module: String, val extern: Boolean = false) {
SUPABASE("supabase-kt"),
AUTH("auth-kt"),
STORAGE("storage-kt"),
REALTIME("realtime-kt"),
FUNCTIONS("functions-kt"),
POSTGREST("postgrest-kt"),
COMPOSE_AUTH("plugins:compose-auth"),
COMPOSE_AUTH_UI("plugins:compose-auth-ui"),
}

fun KotlinDependencyHandler.addModules(vararg modules: SupabaseModule) {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

# Stop when "xargs" is not available.
Expand Down
4 changes: 2 additions & 2 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ goto fail
:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
68 changes: 1 addition & 67 deletions plugins/ApolloGraphQL/README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,3 @@
# Supabase-kt ApolloGraphQL

Extends Supabase-kt with an Apollo GraphQL Client.

Supported targets:

| Target | **JVM** | **Android** | **JS** | **Wasm** | **Apple** |
|--------|---------|-------------|--------|----------|-----------|
| Status | ✅ | ✅ | ✅ | ✅ | ✅ |

<details>

<summary>In-depth Kotlin targets</summary>

**JS**: Browser, NodeJS

**Wasm**: wasm-js

**Apple:**

- iOS: iosArm64, iosSimulatorArm64, iosX64

- tvOS: tvosArm64, tvosX64, tvosSimulatorArm64

- watchOS: watchosArm64, watchosX64, watchosSimulatorArm64

- MacOS: macosX64, macosArm64

</details>

# Installation

Newest version: [![](https://img.shields.io/github/release/supabase-community/supabase-kt?label=)](https://github.com/supabase-community/supabase-kt/releases)

```kotlin
dependencies {
implementation("io.github.jan-tennert.supabase:apollo-graphql:VERSION")
}
```

Install the plugin in your SupabaseClient. See the [documentation](https://supabase.com/docs/reference/kotlin/initializing) for more information

```kotlin
val supabase = createSupabaseClient(
supabaseUrl = "https://id.supabase.co",
supabaseKey = "apikey"
) {
//...

install(GraphQL) {
apolloConfiguration {
// settings
}
}

}
```

# Usage

The plugin automatically creates an Apollo Client with the corresponding headers for Authorization depending on your session.

To access the client, you can use the `apolloClient` property of the `GraphQL` plugin instance.

```kotlin
supabase.graphql.apolloClient.query(YourQuery()).execute().data //execute a query
```

To learn about how to use Apollo GraphQL, see [Apollo Kotlin](https://github.com/apollographql/apollo-kotlin#getting-started).
Moved to [new repository](https://github.com/supabase-community/supabase-kt-plugins/ApolloGraphQL)
104 changes: 1 addition & 103 deletions plugins/Coil3Integration/README.md
Original file line number Diff line number Diff line change
@@ -1,105 +1,3 @@
# Supabase-kt Coil 3 Integration

Extends supabase-kt with a Coil3 integration for image loading.
**Requires supabase-kt `3.0.0` or higher.**

Current supported Coil3 version: `3.0.0-rc01`

Supported targets:

| Target | **JVM** | **Android** | **JS** | **Wasm** | **iOS** |
|--------|---------|-------------|--------|----------|---------|
| Status | ✅ | ✅ | ✅ | ✅ | ✅ |

<details>

<summary>In-depth Kotlin targets</summary>

**JS**: Browser

**Wasm**: wasm-js

**iOS**: iosArm64, iosSimulatorArm64, iosX64

</details>

# Installation

Newest version: [![](https://img.shields.io/github/release/supabase-community/supabase-kt?label=)](https://github.com/supabase-community/supabase-kt/releases)

```kotlin
dependencies {
implementation("io.github.jan-tennert.supabase:coil3-integration:VERSION")
}
```

Install plugin in main SupabaseClient. See the [documentation](https://supabase.com/docs/reference/kotlin/initializing) for more information
```kotlin
val client = createSupabaseClient(
supabaseUrl = "https://id.supabase.co",
supabaseKey = "apikey"
) {
//...
install(Storage) {
//your config
}
install(Coil3Integration)
}
```

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.

# Usage

### Add Supabase Fetcher to Coil

Create a new ImageLoader with the Supabase Fetcher and a [network fetcher](https://coil-kt.github.io/coil/upgrading_to_coil3/#network-images).

```kotlin
ImageLoader.Builder(context)
.components {
add(supabaseClient.coil3)
//You also need the add the network fetcher factory if you don't have it already
//Depending on the network artifact you added, this will be different
add(KtorNetworkFetcherFactory())
}
.build()
```

You can also replace the default Coil Image Loader in your application.
For Compose Multiplatform Applications using the `coil-compose` dependency, you can use the `setSingletonImageLoaderFactory` composable function:
```kotlin
setSingletonImageLoaderFactory { platformContext ->
ImageLoader.Builder(platformContext)
.components {
add(supabaseClient.coil3)
//Your network fetcher factory
add(KtorNetworkFetcherFactory())
}
.build()
}
```
You call this composable before any `Image` composable is used. Presumably in your `Root` composable.

See the [Coil documentation](https://coil-kt.github.io/coil/getting_started/#image-loaders) for more information.

### Display images from Supabase Storage

You can easily create an image request like this:

```kotlin
val request = ImageRequest.Builder(context)
.data(authenticatedStorageItem("icons", "profile.png")) //for non-public buckets
.build()
```

Or if you are using [Compose Multiplatform](https://coil-kt.github.io/coil/compose/):

```kotlin
AsyncImage(
model = publicStorageItem("icons", "profile.png"), //for public buckets
contentDescription = null,
)
```

The Coil integration will automatically add the Authorization header to the request if the bucket is not public.
Moved to [new repository](https://github.com/supabase-community/supabase-kt-plugins/Coil3Integration)
27 changes: 0 additions & 27 deletions plugins/Coil3Integration/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading