# simulation-viewer **Repository Path**: AlanCZ/simulation-viewer ## Basic Information - **Project Name**: simulation-viewer - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-27 - **Last Updated**: 2026-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Simulation Viewer Reusable Android Compose simulation page curl library. ## Features - Single-page and double-page modes - Bitmap-based page source - PDF-based page source via `PdfRenderer` - Standalone Android library module for reuse in other projects - Maven Central publishing config - JitPack build support ## Module - `:simulation-viewer` ## Package - Android namespace: `code.cz.simulation_viewer` - Kotlin package: `code.cz.simulation_viewer` - Maven Central artifact: `code.cz:simulation-viewer:` ## Quick Start ```kotlin val state = rememberPageCurlPagerState() val pageSource = rememberPdfPageSource(uri = pdfUri) SimulationPageCurlPager( pageSource = pageSource, state = state, pageLayoutMode = PageLayoutMode.DOUBLE ) ``` If you already have bitmaps: ```kotlin val pageSource = remember(bitmaps) { BitmapPageSource(bitmaps) } SimulationPageCurlPager( pageSource = pageSource, pageLayoutMode = PageLayoutMode.SINGLE ) ``` ## Publish To Maven Central Configure credentials in `~/.gradle/gradle.properties` or environment variables: ```properties mavenCentralUsername=your-central-portal-token-username mavenCentralPassword=your-central-portal-token-password signingInMemoryKey=-----BEGIN PGP PRIVATE KEY BLOCK-----... signingInMemoryKeyPassword=your-gpg-password ``` Then publish: ```bash ./gradlew publishToMavenCentral ``` Or publish and release: ```bash ./gradlew publishAndReleaseToMavenCentral ``` ## Publish To JitPack This project already includes `jitpack.yml`, and JitPack can build it directly. Important: JitPack version numbers come from your Git reference, not from `VERSION_NAME` inside Gradle. - If you build from a commit, the version shown by JitPack is the commit hash, such as `4870cf8dc3` - If you build from a tag like `1.0.0`, the JitPack version becomes `1.0.0` Recommended release flow: ```bash git add . git commit -m "release: 1.0.0" git tag 1.0.0 git push origin master git push origin 1.0.0 ``` After the tag is pushed, use: ```kotlin dependencyResolutionManagement { repositories { google() mavenCentral() maven(url = "https://jitpack.io") } } dependencies { implementation("com.gitee.AlanCZ:simulation-viewer:1.0.0") } ``` If you do not create a tag, you can still use the commit hash version: ```kotlin implementation("com.gitee.AlanCZ:simulation-viewer:4870cf8dc3") ``` ## Local Build ```bash ./gradlew :simulation-viewer:assembleRelease ./gradlew :simulation-viewer:publishToMavenLocal ``` Generated AAR output: `simulation-viewer/build/outputs/aar/`