Skip to content

Introduce ComposeWorkflow. #1357

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

Draft
wants to merge 6 commits into
base: zachklipp/workflownode-poly
Choose a base branch
from
Draft
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
37 changes: 37 additions & 0 deletions benchmarks/compose-workflow/benchmark-proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-dontobfuscate

-ignorewarnings

-keepattributes *Annotation*

-dontnote junit.framework.**
-dontnote junit.runner.**

-dontwarn androidx.test.**
-dontwarn org.junit.**
-dontwarn org.hamcrest.**
-dontwarn com.squareup.javawriter.JavaWriter

-keepclasseswithmembers @org.junit.runner.RunWith public class *
77 changes: 77 additions & 0 deletions benchmarks/compose-workflow/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import com.rickbusarow.kgx.libsCatalog
import com.rickbusarow.kgx.version
import com.squareup.workflow1.buildsrc.internal.javaTarget
import com.squareup.workflow1.buildsrc.internal.javaTargetVersion

plugins {
id("com.android.library")
id("kotlin-android")
// id("android-defaults")
alias(libs.plugins.androidx.benchmark)
alias(libs.plugins.compose.compiler)
}

// Note: We are not including our defaults from .buildscript as we do not need the base Workflow
// dependencies that those include.

android {
compileSdk = libsCatalog.version("compileSdk").toInt()

compileOptions {
sourceCompatibility = javaTargetVersion
targetCompatibility = javaTargetVersion
}

kotlinOptions {
jvmTarget = javaTarget
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}

defaultConfig {
minSdk = 28
targetSdk = libsCatalog.version("targetSdk").toInt()

// TODO why isn't this taking?
testInstrumentationRunner = "androidx.benchmark.junit4.AndroidBenchmarkRunner"

// must be one of: 'None', 'StackSampling', or 'MethodTracing'
testInstrumentationRunnerArguments["androidx.benchmark.profiling.mode"] = "MethodTracing"
testInstrumentationRunnerArguments["androidx.benchmark.output.enable"] = "true"
}

// buildTypes {
// debug {
// isDebuggable = false
// isProfileable = true
// }
// }

testBuildType = "release"
// testBuildType = "debug"
buildTypes {
debug {
// Since isDebuggable can"t be modified by gradle for library modules,
// it must be done in a manifest - see src/androidTest/AndroidManifest.xml
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "benchmark-proguard-rules.pro"
)
}
release {
isDefault = true
}
}

namespace = "com.squareup.benchmark.composeworkflow.benchmark"
testNamespace = "$namespace.test"
}

dependencies {
androidTestImplementation(project(":workflow-runtime"))
androidTestImplementation(libs.androidx.benchmark)
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.androidx.test.uiautomator)
androidTestImplementation(libs.kotlin.test.jdk)
androidTestImplementation(libs.kotlinx.coroutines.test)
}
17 changes: 17 additions & 0 deletions benchmarks/compose-workflow/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<!--
Important: disable debugging for accurate performance results

In a com.android.library project, this flag must be disabled from this
manifest, as it is not possible to override this flag from Gradle.
-->
<application
android:debuggable="false"
tools:ignore="HardcodedDebugMode"
tools:replace="android:debuggable">
<profileable android:shell="true"/>
</application>
</manifest>
Loading
Loading