Skip to content

Commit

Permalink
testing ci .apk
Browse files Browse the repository at this point in the history
  • Loading branch information
pier-bezuhoff committed Jan 17, 2024
1 parent 3c15443 commit 03bcf83
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
37 changes: 36 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
name: Browser distribution
path: './composeApp/build/dist/wasmJs/productionExecutable/'

- name: Deploy to GithubPages
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: './composeApp/build/dist/wasmJs/productionExecutable/'
Expand Down Expand Up @@ -93,3 +93,38 @@ jobs:
with:
name: "Desktop distribution for ${{ matrix.os }}"
path: 'composeApp/build/compose/binaries/main/app'

build-android:
name: "Build for Android"
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Copy CI gradle.properties (idk about this)
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Gradle build debug .apk for Android
run: ./gradlew assembleDebug

- name: Upload build output
uses: actions/upload-artifact@v4
with:
name: "Android debug .apk"
path: 'composeApp/build/outputs/apk/debug'

10 changes: 8 additions & 2 deletions composeApp/src/commonMain/kotlin/ui/EditClusterScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,15 @@ fun ModeToggle(
Spacer(Modifier.fillMaxHeight().width(8.dp)) // horizontal margin
}


@Composable
fun EditClusterContent(
mode: State<SelectionMode>,
modifier: Modifier = Modifier
) {
// adding viewModel impl is pain in the ass
// NOTE: adding viewModel impl is pain in the ass
// waiting for decompose 3.0-stable
// (use state flows in vM + in ui convert to state with .collectAsStateWithLc)
val circles = remember { mutableStateListOf<Circle>() }
circles.addAll(listOf(
Circle(150.0, 50.0, 50.0),
Expand Down Expand Up @@ -304,6 +306,10 @@ fun EditClusterContent(
if (mode.value.isSelectingCircles()) {
selectCircle(circles, position)?.let { ix ->
grabbedCircleIx = ix
if (mode.value == SelectionMode.DRAG) {
selection.clear()
selection.add(ix)
}
}
}
},
Expand Down Expand Up @@ -356,7 +362,7 @@ fun EditClusterContent(
)
} else if (selection.size > 1) {
handle = Handle.Scale(selection)
// todo
// TODO: show rect + handle in a corner
}
}
}
Expand Down

0 comments on commit 03bcf83

Please sign in to comment.