Skip to content

Commit 5b3cbe6

Browse files
authored
Merge branch 'main' into chore/blueworld
2 parents b380675 + 51f8d34 commit 5b3cbe6

8 files changed

Lines changed: 67 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fun HelloWorld(
4949
```
5050

5151
## First steps for attendees
52-
52+
0. Follow local setup to set Python local variable: [Local setup and building](Local setup and building)
5353
1. Get the code
5454
- Open in Android Studio (Narwhal+). Let Gradle sync.
5555
- Or build from CLI: ./gradlew assembleDebug
@@ -111,7 +111,7 @@ If you see missing Python errors, set an environment variable ZEPATCH_PYTHON_PAT
111111
Example (macOS/Linux):
112112

113113
```bash
114-
export ZEPATCH_PYTHON_PATH=/usr/local/bin/python3
114+
export ZEPATCH_PYTHON_PATH=/usr/bin/python3
115115
```
116116

117117

app/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @gdg-berlin-android/ZeTeam

app/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android {
1212

1313
defaultConfig {
1414
applicationId = "de.berlindroid.zepatch"
15-
minSdk = 24
15+
minSdk = 25
1616
targetSdk = 36
1717
versionCode = 1
1818
versionName = "1.0"
@@ -59,6 +59,7 @@ dependencies {
5959
implementation(libs.androidx.adaptive.navigation)
6060
implementation(libs.androidx.lifecycle.runtime.compose)
6161
implementation(libs.androidx.lifecycle.viewmodel.compose)
62+
implementation(libs.composableSheep)
6263

6364
// Patch annotations + processor
6465
implementation(project(":patch-annotations"))

app/src/main/java/de/berlindroid/zepatch/patchable/Demo.kt

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ import androidx.compose.ui.unit.sp
3232
import de.berlindroid.zepatch.R
3333
import de.berlindroid.zepatch.annotations.Patch
3434
import de.berlindroid.zepatch.ui.SafeArea
35+
import dev.nstv.composablesheep.library.ComposableSheep
36+
import dev.nstv.composablesheep.library.model.Sheep
37+
import dev.nstv.composablesheep.library.util.SheepColor
3538

3639
@OptIn(ExperimentalMaterial3Api::class)
3740
@Patch("AppLogo")
@@ -72,6 +75,25 @@ fun BerlindroidLogo(
7275
}
7376
}
7477

78+
@OptIn(ExperimentalMaterial3Api::class)
79+
@Patch("FourOfThem")
80+
@Composable
81+
fun FourOfThemLogo(
82+
shouldCapture: Boolean = false,
83+
onBitmap: (ImageBitmap) -> Unit = {},
84+
) {
85+
SafeArea(
86+
shouldCapture = shouldCapture,
87+
onBitmap = onBitmap,
88+
) {
89+
Image(
90+
modifier = Modifier.size(200.dp),
91+
painter = painterResource(R.drawable.four_of_them),
92+
contentDescription = null
93+
)
94+
}
95+
}
96+
7597

7698
@OptIn(ExperimentalMaterial3Api::class)
7799
@Patch("GoogleLogo")
@@ -298,3 +320,40 @@ fun PreviewBerlindroid() {
298320
private fun BlueworldLogoPreview() {
299321
BlueworldLogo()
300322
}
323+
324+
@Patch("Composable Sheep")
325+
@Composable
326+
fun ComposableSheepPatchable(
327+
shouldCapture: Boolean = false, // used to activate the convert to bitmap
328+
onBitmap: (ImageBitmap) -> Unit = {}, // used to return the bitmap from the SafeArea
329+
) {
330+
SafeArea(
331+
shouldCapture = shouldCapture,
332+
onBitmap = onBitmap,
333+
) {
334+
ComposableSheep(
335+
sheep = Sheep(fluffColor = SheepColor.Green),
336+
modifier = Modifier.size(300.dp),
337+
)
338+
}
339+
}
340+
341+
@Preview
342+
@Patch("ZeWednesday")
343+
@Composable
344+
fun ZeWednesday(
345+
shouldCapture: Boolean = false, // used to activate the convert to bitmap
346+
onBitmap: (ImageBitmap) -> Unit = {}, // used to return the bitmap from the SafeArea
347+
) {
348+
SafeArea(
349+
shouldCapture = shouldCapture,
350+
onBitmap = onBitmap,
351+
) {
352+
Image(
353+
modifier = Modifier.size(200.dp),
354+
painter = painterResource(R.drawable.ze_frog),
355+
contentDescription = null
356+
)
357+
}
358+
}
359+
53.1 KB
Loading
28.1 KB
Loading

converter/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010
compileSdk = 36
1111

1212
defaultConfig {
13-
minSdk = 24
13+
minSdk = 25
1414

1515
ndk {
1616
abiFilters += listOf("arm64-v8a", "x86_64")

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ junitKtx = "1.3.0"
1818
appcompat = "1.7.1"
1919
material = "1.13.0"
2020
jts = "1.20.0"
21+
composableSheep = "1.1.0"
2122

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

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

0 commit comments

Comments
 (0)