Skip to content
Merged
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: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fun HelloWorld(
```

## First steps for attendees

0. Follow local setup to set Python local variable: [Local setup and building](Local setup and building)
1. Get the code
- Open in Android Studio (Narwhal+). Let Gradle sync.
- Or build from CLI: ./gradlew assembleDebug
Expand Down Expand Up @@ -111,7 +111,7 @@ If you see missing Python errors, set an environment variable ZEPATCH_PYTHON_PAT
Example (macOS/Linux):

```bash
export ZEPATCH_PYTHON_PATH=/usr/local/bin/python3
export ZEPATCH_PYTHON_PATH=/usr/bin/python3
```


Expand Down
3 changes: 2 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {

defaultConfig {
applicationId = "de.berlindroid.zepatch"
minSdk = 24
minSdk = 25
targetSdk = 36
versionCode = 1
versionName = "1.0"
Expand Down Expand Up @@ -59,6 +59,7 @@ dependencies {
implementation(libs.androidx.adaptive.navigation)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.composableSheep)

// Patch annotations + processor
implementation(project(":patch-annotations"))
Expand Down
22 changes: 22 additions & 0 deletions app/src/main/java/de/berlindroid/zepatch/patchable/Demo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ import androidx.compose.ui.unit.sp
import de.berlindroid.zepatch.R
import de.berlindroid.zepatch.annotations.Patch
import de.berlindroid.zepatch.ui.SafeArea
import dev.nstv.composablesheep.library.ComposableSheep
import dev.nstv.composablesheep.library.model.Sheep
import dev.nstv.composablesheep.library.util.SheepColor

@OptIn(ExperimentalMaterial3Api::class)
@Patch("AppLogo")
Expand Down Expand Up @@ -274,3 +277,22 @@ fun PreviewFlex() {
fun PreviewBerlindroid() {
BerlindroidLogo()
}

@Preview
@Patch("Composable Sheep")
@Composable
fun ComposableSheepPatchable(
shouldCapture: Boolean = false, // used to activate the convert to bitmap
onBitmap: (ImageBitmap) -> Unit = {}, // used to return the bitmap from the SafeArea
) {
SafeArea(
shouldCapture = shouldCapture,
onBitmap = onBitmap,
) {
ComposableSheep(
sheep = Sheep(fluffColor = SheepColor.Green),
modifier = Modifier.size(300.dp),
)
}
}

2 changes: 1 addition & 1 deletion converter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
compileSdk = 36

defaultConfig {
minSdk = 24
minSdk = 25

ndk {
abiFilters += listOf("arm64-v8a", "x86_64")
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ junitKtx = "1.3.0"
appcompat = "1.7.1"
material = "1.13.0"
jts = "1.20.0"
composableSheep = "1.1.0"

[libraries]
kotlinpoet = { group = "com.squareup", name = "kotlinpoet", version.ref = "kotlinpoet" }
Expand Down Expand Up @@ -47,6 +48,7 @@ androidx-junit-ktx = { group = "androidx.test.ext", name = "junit-ktx", version.
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
jts = { group = "org.locationtech.jts", name = "jts-core", version.ref = "jts" }
composableSheep = { module = "dev.nstv:composablesheep", version.ref = "composableSheep" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
Expand Down