diff --git a/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-module/build.gradle b/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-module/build.gradle index 91f1859296..b8356e47ac 100644 --- a/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-module/build.gradle +++ b/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-module/build.gradle @@ -14,7 +14,7 @@ repositories { } android { - namespace 'app.cash.paparazzi.plugin.test' + namespace 'app.cash.paparazzi.plugin.font' compileSdk libs.versions.compileSdk.get() as int defaultConfig { minSdk libs.versions.minSdk.get() as int diff --git a/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/build.gradle b/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/build.gradle index 907169318a..92303edc17 100644 --- a/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/build.gradle +++ b/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/build.gradle @@ -20,9 +20,16 @@ android { minSdk libs.versions.minSdk.get() as int vectorDrawables.useSupportLibrary = true } + buildFeatures { + compose true + } + composeOptions { + kotlinCompilerExtensionVersion libs.versions.composeCompiler.get() + } } dependencies { implementation project(':fonts-module') implementation libs.androidx.appcompat + implementation libs.composeUi.material } diff --git a/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/src/main/java/app/cash/paparazzi/plugin/test/ComposeView.kt b/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/src/main/java/app/cash/paparazzi/plugin/test/ComposeView.kt new file mode 100644 index 0000000000..de29ddbd1e --- /dev/null +++ b/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/src/main/java/app/cash/paparazzi/plugin/test/ComposeView.kt @@ -0,0 +1,37 @@ +package app.cash.paparazzi.plugin.test + +import android.content.Context +import android.util.AttributeSet +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.size +import androidx.compose.material.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.AbstractComposeView +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.Font +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.unit.dp +import app.cash.paparazzi.plugin.font.R + +class ComposeView(context: Context, attrs: AttributeSet) : AbstractComposeView(context, attrs) { + + @Composable + override fun Content() { + val font = FontFamily(Font(R.font.cashmarket_medium)) + + Column { + Text( + text = "Compose: text with custom font", + fontFamily = font + ) + + Image( + modifier = Modifier.size(32.dp), + painter = painterResource(R.drawable.arrow_up), + contentDescription = "arrow up" + ) + } + } +} diff --git a/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/src/main/res/layout/app_compat_views.xml b/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/src/main/res/layout/app_compat_views.xml index 26830ca830..62dc35c553 100644 --- a/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/src/main/res/layout/app_compat_views.xml +++ b/paparazzi/paparazzi-gradle-plugin/src/test/projects/custom-fonts-multi-module/fonts-view-module/src/main/res/layout/app_compat_views.xml @@ -59,6 +59,12 @@ android:textSize="32sp" tools:ignore="HardcodedText" /> + -