docs: Update comprehensive documentation with AI features, health checks, and architecture improvements
- Document automatic token verification on startup and note:// prefix for Markdown notes - Add extensive AI capabilities section (Gemini integration, auto-tagging, content classification, multi-model fallback) - Document link health monitoring system with dead link detection and exclusion features - Add file sharing support (Markdown/text files) and deep links documentation - Update technology
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
id("com.android.test")
|
||||
alias(libs.plugins.jetbrains.kotlin.android)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.shaarit.benchmark"
|
||||
compileSdk = 34
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 24
|
||||
targetSdk = 34
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
create("benchmark") {
|
||||
isDebuggable = true
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
matchingFallbacks += listOf("release")
|
||||
}
|
||||
}
|
||||
|
||||
targetProjectPath = ":app"
|
||||
experimentalProperties["android.experimental.self-instrumenting"] = true
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("androidx.test.ext:junit:1.1.5")
|
||||
implementation("androidx.test.espresso:espresso-core:3.5.1")
|
||||
implementation("androidx.test.uiautomator:uiautomator:2.2.0")
|
||||
implementation("androidx.benchmark:benchmark-macro-junit4:1.2.3")
|
||||
}
|
||||
|
||||
androidComponents {
|
||||
beforeVariants(selector().all()) {
|
||||
it.enable = it.buildType == "benchmark"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
</manifest>
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.shaarit.benchmark
|
||||
|
||||
import androidx.benchmark.macro.junit4.BaselineProfileRule
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import androidx.test.filters.LargeTest
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
/**
|
||||
* Generates Baseline Profiles for ShaarIt.
|
||||
*
|
||||
* Baseline Profiles pre-compile critical user journeys (cold start, navigation, scroll)
|
||||
* using AOT compilation, avoiding JIT compilation at runtime.
|
||||
*
|
||||
* Typical gain: 30-50% reduction in cold start time for Compose apps.
|
||||
*
|
||||
* To generate the profile, run:
|
||||
* ./gradlew :benchmark:pixel6Api31BenchmarkAndroidTest -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
|
||||
*
|
||||
* Then copy the generated baseline-prof.txt to app/src/main/baseline-prof.txt
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@LargeTest
|
||||
class BaselineProfileGenerator {
|
||||
|
||||
@get:Rule
|
||||
val rule = BaselineProfileRule()
|
||||
|
||||
@Test
|
||||
fun generateProfile() {
|
||||
rule.collect(
|
||||
packageName = "com.shaarit",
|
||||
includeInStartupProfile = true
|
||||
) {
|
||||
// Cold start — launch the main activity
|
||||
startActivityAndWait()
|
||||
|
||||
// Wait for the feed to load
|
||||
device.waitForIdle()
|
||||
|
||||
// Scroll the feed to capture scroll-related code paths
|
||||
val feedList = device.findObject(
|
||||
androidx.test.uiautomator.By.scrollable(true)
|
||||
)
|
||||
feedList?.let {
|
||||
it.scroll(androidx.test.uiautomator.Direction.DOWN, 2.0f)
|
||||
device.waitForIdle()
|
||||
it.scroll(androidx.test.uiautomator.Direction.UP, 2.0f)
|
||||
device.waitForIdle()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user