diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 3ec9b7acc..055e8b93f 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -113,18 +113,18 @@ android { matchingFallbacks += listOf("release") } - create("benchmark") { - isShrinkResources = true - isMinifyEnabled = true - signingConfig = signingConfigs.getByName("confetti") - setProguardFiles( - listOf( - getDefaultProguardFile("proguard-android.txt"), - "proguard-benchmark.pro" - ) - ) - matchingFallbacks.addAll(listOf("release")) - } +// create("benchmark") { +// isShrinkResources = true +// isMinifyEnabled = true +// signingConfig = signingConfigs.getByName("confetti") +// setProguardFiles( +// listOf( +// getDefaultProguardFile("proguard-android.txt"), +// "proguard-benchmark.pro" +// ) +// ) +// matchingFallbacks.addAll(listOf("release")) +// } getByName("debug") { signingConfig = signingConfigs.getByName("confetti") } diff --git a/androidBenchmark/build.gradle.kts b/androidBenchmark/build.gradle.kts index 338022cd6..57c4ff03b 100644 --- a/androidBenchmark/build.gradle.kts +++ b/androidBenchmark/build.gradle.kts @@ -4,11 +4,11 @@ plugins { } android { - compileSdk = 33 + compileSdk = 35 defaultConfig { minSdk = 29 - targetSdk = 33 + targetSdk = 35 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/androidBenchmark/src/main/java/dev/johnoreilly/confetti/benchmark/BaselineProfile.kt b/androidBenchmark/src/main/java/dev/johnoreilly/confetti/benchmark/BaselineProfile.kt index 33f1308b0..5b744b388 100644 --- a/androidBenchmark/src/main/java/dev/johnoreilly/confetti/benchmark/BaselineProfile.kt +++ b/androidBenchmark/src/main/java/dev/johnoreilly/confetti/benchmark/BaselineProfile.kt @@ -18,7 +18,7 @@ class BaselineProfile { @Test fun openAndScroll() { - baselineRule.collectBaselineProfile( + baselineRule.collect( packageName = "dev.johnoreilly.confetti" ) { pressHome() diff --git a/backend/datastore/src/jvmTest/kotlin/test/MainTest.kt b/backend/datastore/src/jvmTest/kotlin/test/MainTest.kt deleted file mode 100644 index 846447683..000000000 --- a/backend/datastore/src/jvmTest/kotlin/test/MainTest.kt +++ /dev/null @@ -1,15 +0,0 @@ -package test - -import dev.johnoreilly.confetti.backend.datastore.DataStore -import org.junit.Test -import kotlin.test.assertEquals - -class MainTest { - @Test - fun getBookmarks() { - val datastore = DataStore() - - datastore.addBookmark("testUser", "androidmakers2023", "session0") - assertEquals(setOf("session0"), datastore.readBookmarks("testUser", "androidmakers2023")) - } -} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/Dependencies.kt b/build-logic/src/main/kotlin/Dependencies.kt index 9b8ebb62f..757bb1439 100644 --- a/build-logic/src/main/kotlin/Dependencies.kt +++ b/build-logic/src/main/kotlin/Dependencies.kt @@ -14,7 +14,7 @@ object WearSdk { object AutomotiveSdk { const val min = 29 - const val compile = 34 + const val compile = 35 const val target = 33 } diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index 061316161..d703b0c88 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -2811,12 +2811,7 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - -ws@^8.13.0: +ws@8.18.0, ws@^8.13.0: version "8.18.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== diff --git a/settings.gradle.kts b/settings.gradle.kts index bf9b4e883..06ed2e5d3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -32,8 +32,8 @@ pluginManagement { rootProject.name = "Confetti" include(":androidApp") -include(":androidBenchmark") -include(":automotiveApp") +//include(":androidBenchmark") +//include(":automotiveApp") include(":common:car") include(":shared") include(":backend") @@ -44,7 +44,6 @@ include(":backend:terraform") include(":landing-page") include(":wearApp") include(":wearBenchmark") -include(":webApp") include(":compose-desktop") include(":compose-web") include(":proto") diff --git a/wearApp/build.gradle.kts b/wearApp/build.gradle.kts index 075935331..4c80c48b4 100644 --- a/wearApp/build.gradle.kts +++ b/wearApp/build.gradle.kts @@ -99,13 +99,13 @@ android { signingConfig = signingConfigs.getByName("release") setProguardFiles(listOf(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")) } - create("benchmark") { - isShrinkResources = true - isMinifyEnabled = true - signingConfig = signingConfigs.getByName("confetti") - setProguardFiles(listOf(getDefaultProguardFile("proguard-android.txt"), "proguard-benchmark.pro")) - matchingFallbacks.addAll(listOf("release")) - } +// create("benchmark") { +// isShrinkResources = true +// isMinifyEnabled = true +// signingConfig = signingConfigs.getByName("confetti") +// setProguardFiles(listOf(getDefaultProguardFile("proguard-android.txt"), "proguard-benchmark.pro")) +// matchingFallbacks.addAll(listOf("release")) +// } create("githubRelease") { isShrinkResources = true isMinifyEnabled = true diff --git a/wearBenchmark/src/main/java/dev/johnoreilly/confetti/benchmark/BaselineProfile.kt b/wearBenchmark/src/main/java/dev/johnoreilly/confetti/benchmark/BaselineProfile.kt index 53618af36..5d1ca413c 100644 --- a/wearBenchmark/src/main/java/dev/johnoreilly/confetti/benchmark/BaselineProfile.kt +++ b/wearBenchmark/src/main/java/dev/johnoreilly/confetti/benchmark/BaselineProfile.kt @@ -12,7 +12,7 @@ class BaselineProfile { @Test fun profile() { - baselineRule.collectBaselineProfile( + baselineRule.collect( packageName = "dev.johnoreilly.confetti" ) { startActivityAndWait() diff --git a/webApp/build.gradle.kts b/webApp/build.gradle.kts deleted file mode 100644 index b0671d6f1..000000000 --- a/webApp/build.gradle.kts +++ /dev/null @@ -1,45 +0,0 @@ -import org.jetbrains.compose.ExperimentalComposeLibrary -import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl - -plugins { - kotlin("multiplatform") - id("org.jetbrains.compose") - id("com.apollographql.apollo") - alias(libs.plugins.compose.compiler) -} - -kotlin { - @OptIn(ExperimentalWasmDsl::class) - wasmJs { - moduleName = "composeApp" - browser { - commonWebpackConfig { - outputFileName = "composeApp.js" - } - } - binaries.executable() - } - - sourceSets { - commonMain.dependencies { - implementation(compose.runtime) - implementation(compose.foundation) - implementation(compose.material) - implementation(compose.ui) - implementation(libs.apollo.runtime) - @OptIn(ExperimentalComposeLibrary::class) - implementation(compose.components.resources) - } - } -} - -compose.experimental { - web.application {} -} - -apollo { - service("api") { - schemaFiles.from(fileTree("../shared/src/commonMain/graphql/").include("**/*.graphqls")) - packageName.set("confetti.web") - } -} \ No newline at end of file diff --git a/webApp/src/commonMain/graphql/GetConferences.graphql b/webApp/src/commonMain/graphql/GetConferences.graphql deleted file mode 100644 index 27b978c81..000000000 --- a/webApp/src/commonMain/graphql/GetConferences.graphql +++ /dev/null @@ -1,6 +0,0 @@ -query GetConferences { - conferences { - name - days - } -} \ No newline at end of file diff --git a/webApp/src/commonMain/kotlin/App.kt b/webApp/src/commonMain/kotlin/App.kt deleted file mode 100644 index 6737ccd62..000000000 --- a/webApp/src/commonMain/kotlin/App.kt +++ /dev/null @@ -1,70 +0,0 @@ -import androidx.compose.foundation.layout.* -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.LazyRow -import androidx.compose.material.CircularProgressIndicator -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.collectAsState -import androidx.compose.runtime.remember -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import com.apollographql.apollo.ApolloClient -import com.apollographql.apollo.api.ApolloResponse -import com.apollographql.apollo.api.Operation -import confetti.web.GetConferencesQuery -import kotlinx.coroutines.flow.Flow - -@Composable -fun App() { - MaterialTheme { - - Box(Modifier.fillMaxWidth().fillMaxHeight()) { - Box(Modifier.align(Alignment.Center)) { - val responseState = remember { conferenceData() }.collectAsState(null) - - val response = responseState.value - when { - response == null -> { - CircularProgressIndicator() - } - response.data != null -> { - ConferenceList(response.data!!.conferences) - } - else -> { - response.toException().printStackTrace() - Text("Oops something went wrong: ${response.toException().message}") - } - } - } - } - } -} - -fun ApolloResponse.toException(): Exception { - when { - exception != null -> return exception!! - else -> return Exception("no data and no exception") - } -} - -@Composable -fun ConferenceList(conferences: List) { - LazyColumn(Modifier.width(400.dp)) { - items(conferences.size) { - val conference = conferences.get(it) - Row { - Text(conference.name, Modifier.weight(1.0f)) - Text(conference.days.first().toString()) - } - } - } -} -fun conferenceData(): Flow> { - return ApolloClient.Builder() - .serverUrl("https://confetti-app.dev/graphql") - .build() - .query(GetConferencesQuery()) - .toFlow() -} \ No newline at end of file diff --git a/webApp/src/wasmJsMain/kotlin/main.kt b/webApp/src/wasmJsMain/kotlin/main.kt deleted file mode 100644 index b9c0f6439..000000000 --- a/webApp/src/wasmJsMain/kotlin/main.kt +++ /dev/null @@ -1,7 +0,0 @@ -import androidx.compose.ui.ExperimentalComposeUiApi -import androidx.compose.ui.window.CanvasBasedWindow - -@OptIn(ExperimentalComposeUiApi::class) -fun main() { - CanvasBasedWindow(canvasElementId = "ComposeTarget") { App() } -} \ No newline at end of file diff --git a/webApp/src/wasmJsMain/resources/index.html b/webApp/src/wasmJsMain/resources/index.html deleted file mode 100644 index 9ba000fea..000000000 --- a/webApp/src/wasmJsMain/resources/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Compose App - - - - - - - \ No newline at end of file