Skip to content
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

Update to snapshots 1.0/gradle plugin 3.0 #46

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
8 changes: 1 addition & 7 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.emerge)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ksp)
alias(libs.plugins.kotlin.serialization)
}

Expand Down Expand Up @@ -94,16 +93,11 @@ dependencies {

testImplementation(libs.junit)

androidTestImplementation(libs.emerge.snapshots)
androidTestImplementation(libs.junit)
androidTestImplementation(libs.androidx.core)
androidTestImplementation(libs.androidx.fragment)
androidTestImplementation(libs.androidx.test.core)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.emerge.snapshots)

// Generates snapshots for any Previews in the main source set
ksp(libs.emerge.snapshots.processor)
// Generates snapshots for any Previews in the androidTest source set
kspAndroidTest(libs.emerge.snapshots.processor)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import com.emergetools.hackernews.ui.items.BuildStory

/**
* Example generated snapshot test from androidTest source set.
* To generate a snapshot test for this preview, add the snapshot-processor as a kspAndroidTest
* dependency.
* To generate a snapshot test for this preview, add the androidTest source set to the debug variant.
*/
@Preview
@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ fun BuildComment(

/**
* Example generated snapshot test from main source set.
* To generate a snapshot test for this preview, add the snapshot-processor as a ksp dependency.
*/
@SnapshotTestingPreviews
@Preview
Expand Down
1 change: 0 additions & 1 deletion android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ plugins {
alias(libs.plugins.emerge) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.ksp) apply false
}
7 changes: 2 additions & 5 deletions android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ androidx-test-ext = "1.1.5"
accompanist = "0.33.2-alpha"
compose-bom = "2024.02.02"
compose-compiler-extension = "1.5.3"
emerge-gradle-plugin = "2.2.0"
emerge-gradle-plugin = "3.0.0"
emerge-perf = "2.1.1"
emerge-snapshots = "0.8.4"
emerge-snapshots = "1.0.0"
kotlin = "1.9.10"
ksp = "1.9.10-1.0.13"
material-compose = "1.6.3"
navigation-compose = "2.7.7"
okhttp = "4.11.0"
Expand All @@ -21,7 +20,6 @@ android-test = { id = "com.android.test", version.ref = "agp" }
emerge = { id = "com.emergetools.android", version.ref = "emerge-gradle-plugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }

[libraries]
accompanist-navigationanim = { module = "com.google.accompanist:accompanist-navigation-animation", version.ref = "accompanist" }
Expand All @@ -44,7 +42,6 @@ compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling
emerge-perf = { module = "com.emergetools.test:performance", version.ref = "emerge-perf" }
emerge-snapshots = { module = "com.emergetools.snapshots:snapshots", version.ref = "emerge-snapshots" }
emerge-snapshots-annotations = { module = "com.emergetools.snapshots:snapshots-annotations", version.ref = "emerge-snapshots" }
emerge-snapshots-processor = { module = "com.emergetools.snapshots:snapshots-processor", version.ref = "emerge-snapshots" }

junit = "junit:junit:4.13.2"

Expand Down
1 change: 0 additions & 1 deletion android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ rootProject.name = "HackerNews"
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
google()
}
}
Expand Down
Loading