Compare commits
2 Commits
main
...
versioning
| Author | SHA1 | Date | |
|---|---|---|---|
| 67cd8ee250 | |||
| 3d6a07e81c |
35
.gitea/workflows/flatpak.yaml
Normal file
35
.gitea/workflows/flatpak.yaml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
# TODO: remove versioning branch once everything works
|
||||||
|
branches: [main,versioning]
|
||||||
|
tags:
|
||||||
|
- '[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
name: Flatpak
|
||||||
|
jobs:
|
||||||
|
flatpak:
|
||||||
|
name: Flatpak
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
|
||||||
|
options: --privileged
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: 21
|
||||||
|
distribution: 'temurin'
|
||||||
|
- name: Cache Gradle packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.gradle/caches
|
||||||
|
key: ${{ runner.os }}-gradle
|
||||||
|
restore-keys: ${{ runner.os }}-gradle
|
||||||
|
- name: Build Release Uber JAR
|
||||||
|
run: ./gradlew packageReleaseUberJarForCurrentOS
|
||||||
|
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||||
|
with:
|
||||||
|
bundle: YAEP.flatpak
|
||||||
|
manifest-path: ./flatpak/ch.dissem.YAEP.yml
|
||||||
|
cache-key: flatpak-builder-${{ github.sha }}
|
||||||
|
upload-artifact: false
|
||||||
@@ -23,8 +23,6 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
- name: Install missing packages
|
|
||||||
run: apt-get update; apt-get install -y libglu1-mesa-dev
|
|
||||||
- name: Cache SonarQube packages
|
- name: Cache SonarQube packages
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
@@ -41,4 +39,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
||||||
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
|
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
|
||||||
run: ./gradlew sonar --stacktrace
|
run: ./gradlew sonar
|
||||||
|
|||||||
26
CHANGELOG.md
Normal file
26
CHANGELOG.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Yet Another Einstein Puzzle, for Desktop and not-quite-yet Android
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
|
||||||
|
[unreleased]: https://git.dissem.ch/chris/YAEP/compare/1b9c8633c96e479e63afcd7301125ce67247a198...HEAD
|
||||||
|
[0.0.0]: https://git.dissem.ch/chris/YAEP/releases/tag/0.0.0
|
||||||
@@ -56,11 +56,6 @@ android {
|
|||||||
merges += "/META-INF/{AL2.0,LGPL2.1}"
|
merges += "/META-INF/{AL2.0,LGPL2.1}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lint {
|
|
||||||
baseline = file("lint-baseline.xml")
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<issues format="6" by="lint 8.13.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.13.2)" variant="all" version="8.13.2">
|
|
||||||
|
|
||||||
</issues>
|
|
||||||
@@ -8,6 +8,7 @@ plugins {
|
|||||||
alias(libs.plugins.versions)
|
alias(libs.plugins.versions)
|
||||||
alias(libs.plugins.sonarqube)
|
alias(libs.plugins.sonarqube)
|
||||||
alias(libs.plugins.kotlin.kover)
|
alias(libs.plugins.kotlin.kover)
|
||||||
|
alias(libs.plugins.versioning)
|
||||||
alias(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
alias(libs.plugins.android.library) apply false
|
alias(libs.plugins.android.library) apply false
|
||||||
alias(libs.plugins.compose) apply false
|
alias(libs.plugins.compose) apply false
|
||||||
@@ -17,11 +18,28 @@ plugins {
|
|||||||
alias(libs.plugins.kotlin.android) apply false
|
alias(libs.plugins.kotlin.android) apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
version = "0.0.0-SNAPSHOT"
|
||||||
|
gitVersioning.apply {
|
||||||
|
refs {
|
||||||
|
branch(".+") {
|
||||||
|
considerTagsOnBranches = true
|
||||||
|
version = "\${ref}-SNAPSHOT"
|
||||||
|
}
|
||||||
|
tag("(?<version>.*)") {
|
||||||
|
version = "\${ref.version}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// optional fallback configuration in case of no matching ref configuration
|
||||||
|
rev {
|
||||||
|
version = "\${commit}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sonar {
|
sonar {
|
||||||
properties {
|
properties {
|
||||||
property("sonar.projectKey", "YAEP")
|
property("sonar.projectKey", "YAEP")
|
||||||
property("sonar.projectName", "YAEP")
|
property("sonar.projectName", "YAEP")
|
||||||
property("sonar.organization", "default")
|
|
||||||
|
|
||||||
property(
|
property(
|
||||||
"sonar.coverage.jacoco.xmlReportPaths",
|
"sonar.coverage.jacoco.xmlReportPaths",
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlin.kover)
|
alias(libs.plugins.kotlin.kover)
|
||||||
alias(libs.plugins.kotlin.multiplatform)
|
alias(libs.plugins.kotlin.multiplatform)
|
||||||
@@ -10,12 +13,9 @@ kotlin {
|
|||||||
jvmToolchain(libs.versions.jdk.get().toInt())
|
jvmToolchain(libs.versions.jdk.get().toInt())
|
||||||
|
|
||||||
jvm()
|
jvm()
|
||||||
androidLibrary {
|
androidTarget {
|
||||||
namespace = "ch.dissem.yaep.common.ui"
|
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||||
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
|
||||||
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
||||||
|
|
||||||
experimentalProperties["android.experimental.kmp.enableAndroidResources"] = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
@@ -44,10 +44,36 @@ kotlin {
|
|||||||
jvmTest.dependencies {
|
jvmTest.dependencies {
|
||||||
implementation(compose.desktop.currentOs)
|
implementation(compose.desktop.currentOs)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
androidMain.dependencies {
|
android {
|
||||||
|
namespace = "ch.dissem.yaep.common.ui"
|
||||||
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||||
|
|
||||||
|
dependencies {
|
||||||
implementation(libs.androidx.compose.foundation)
|
implementation(libs.androidx.compose.foundation)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
compose = true
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
getByName("test") {
|
||||||
|
resources.srcDirs("src/commonTest/resources")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
enableAndroidTestCoverage = true
|
||||||
|
enableUnitTestCoverage = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
import org.jetbrains.compose.desktop.application.dsl.TargetFormat.Deb
|
||||||
|
import org.jetbrains.compose.desktop.application.dsl.TargetFormat.Dmg
|
||||||
|
import org.jetbrains.compose.desktop.application.dsl.TargetFormat.Msi
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlin.kover)
|
alias(libs.plugins.kotlin.kover)
|
||||||
@@ -29,18 +31,31 @@ compose.desktop {
|
|||||||
mainClass = "ch.dissem.yaep.ui.desktop.MainKt"
|
mainClass = "ch.dissem.yaep.ui.desktop.MainKt"
|
||||||
|
|
||||||
nativeDistributions {
|
nativeDistributions {
|
||||||
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
val formats = mutableListOf(Deb)
|
||||||
packageName = "YAEP"
|
packageName = "YAEP"
|
||||||
packageVersion = libs.versions.app.version.name.get()
|
val baseVersion = version.toString()
|
||||||
|
packageVersion = baseVersion
|
||||||
|
if (baseVersion.matches(Regex("[1-9][0-9]*(\\.[0-9]+)(\\.[0-9]+)"))) {
|
||||||
|
formats.add(Dmg)
|
||||||
macOS {
|
macOS {
|
||||||
iconFile.set(project.file("icon.icns"))
|
iconFile.set(project.file("icon.icns"))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (baseVersion.matches(Regex("[1-2]?[0-9]?[0-9]\\.[1-2]?[0-9]?[0-9]\\.[1-6]?[0-9]?[0-9]?[0-9]?[0-9]"))) {
|
||||||
windows {
|
windows {
|
||||||
|
formats.add(Msi)
|
||||||
iconFile.set(project.file("icon.ico"))
|
iconFile.set(project.file("icon.ico"))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
linux {
|
linux {
|
||||||
|
debPackageVersion = if (baseVersion.first().isDigit()) {
|
||||||
|
baseVersion
|
||||||
|
} else {
|
||||||
|
"0-$baseVersion"
|
||||||
|
}
|
||||||
iconFile.set(project.file("icon.png"))
|
iconFile.set(project.file("icon.png"))
|
||||||
}
|
}
|
||||||
|
targetFormats(*formats.toTypedArray())
|
||||||
|
|
||||||
buildTypes.release.proguard {
|
buildTypes.release.proguard {
|
||||||
configurationFiles.from(project.file("proguard-rules.pro"))
|
configurationFiles.from(project.file("proguard-rules.pro"))
|
||||||
|
|||||||
@@ -8,11 +8,7 @@ kotlin {
|
|||||||
jvmToolchain(libs.versions.jdk.get().toInt())
|
jvmToolchain(libs.versions.jdk.get().toInt())
|
||||||
|
|
||||||
jvm()
|
jvm()
|
||||||
androidLibrary {
|
androidTarget()
|
||||||
namespace = "ch.dissem.yaep.domain"
|
|
||||||
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
|
||||||
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
commonMain.dependencies {
|
commonMain.dependencies {
|
||||||
@@ -25,3 +21,25 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "ch.dissem.yaep.domain"
|
||||||
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
getByName("test") {
|
||||||
|
resources.srcDirs("src/commonTest/resources")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
enableAndroidTestCoverage = true
|
||||||
|
enableUnitTestCoverage = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,11 +14,8 @@ class SameColumnClueTest : ClueTest() {
|
|||||||
val a = grid[ia][j]
|
val a = grid[ia][j]
|
||||||
val b = grid[ib][j]
|
val b = grid[ib][j]
|
||||||
|
|
||||||
a.solution!!
|
expect(SameColumnClue(a.solution!!, b.solution!!).isValid(grid)).toEqual(true)
|
||||||
b.solution!!
|
expect(SameColumnClue(b.solution!!, a.solution!!).isValid(grid)).toEqual(true)
|
||||||
|
|
||||||
expect(SameColumnClue(a.solution, b.solution).isValid(grid)).toEqual(true)
|
|
||||||
expect(SameColumnClue(b.solution, a.solution).isValid(grid)).toEqual(true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,11 +32,8 @@ class SameColumnClueTest : ClueTest() {
|
|||||||
val a = grid[ia][ja]
|
val a = grid[ia][ja]
|
||||||
val b = grid[ib][jb]
|
val b = grid[ib][jb]
|
||||||
|
|
||||||
a.solution!!
|
expect(SameColumnClue(a.solution!!, b.solution!!).isValid(grid)).toEqual(false)
|
||||||
b.solution!!
|
expect(SameColumnClue(b.solution!!, a.solution!!).isValid(grid)).toEqual(false)
|
||||||
|
|
||||||
expect(SameColumnClue(a.solution, b.solution).isValid(grid)).toEqual(false)
|
|
||||||
expect(SameColumnClue(b.solution, a.solution).isValid(grid)).toEqual(false)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,14 +51,11 @@ class SameColumnClueTest : ClueTest() {
|
|||||||
val a = grid[ia][ja]
|
val a = grid[ia][ja]
|
||||||
val b = grid[ib][jb]
|
val b = grid[ib][jb]
|
||||||
|
|
||||||
a.solution!!
|
|
||||||
b.solution!!
|
|
||||||
|
|
||||||
a.selection = a.solution
|
a.selection = a.solution
|
||||||
b.selection = b.solution
|
b.selection = b.solution
|
||||||
|
|
||||||
expect(SameColumnClue(a.solution, b.solution).isValid(grid)).toEqual(false)
|
expect(SameColumnClue(a.solution!!, b.solution!!).isValid(grid)).toEqual(false)
|
||||||
expect(SameColumnClue(b.solution, a.solution).isValid(grid)).toEqual(false)
|
expect(SameColumnClue(b.solution!!, a.solution!!).isValid(grid)).toEqual(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,10 +72,6 @@ class SameColumnClueTest : ClueTest() {
|
|||||||
for (i in 0 until size) {
|
for (i in 0 until size) {
|
||||||
val a = rowA[i]
|
val a = rowA[i]
|
||||||
val b = rowB[i]
|
val b = rowB[i]
|
||||||
|
|
||||||
a.solution!!
|
|
||||||
b.solution!!
|
|
||||||
|
|
||||||
rowA.forEachIndexed { index, gameCell ->
|
rowA.forEachIndexed { index, gameCell ->
|
||||||
if (index < i) {
|
if (index < i) {
|
||||||
gameCell.selection = rowA.options.filter { it != a.solution }.random()
|
gameCell.selection = rowA.options.filter { it != a.solution }.random()
|
||||||
@@ -100,8 +87,8 @@ class SameColumnClueTest : ClueTest() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(SameColumnClue(a.solution, b.solution).isValid(grid)).toEqual(false)
|
expect(SameColumnClue(a.solution!!, b.solution!!).isValid(grid)).toEqual(false)
|
||||||
expect(SameColumnClue(b.solution, a.solution).isValid(grid)).toEqual(false)
|
expect(SameColumnClue(b.solution!!, a.solution!!).isValid(grid)).toEqual(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,12 +17,8 @@ class TripletClueTest : ClueTest() {
|
|||||||
val b = grid[ib][j - 1]
|
val b = grid[ib][j - 1]
|
||||||
val c = grid[ic][j]
|
val c = grid[ic][j]
|
||||||
|
|
||||||
a.solution!!
|
expect(TripletClue(a.solution!!, b.solution!!, c.solution!!).isValid(grid)).toEqual(true)
|
||||||
b.solution!!
|
expect(TripletClue(c.solution!!, b.solution!!, a.solution!!).isValid(grid)).toEqual(true)
|
||||||
c.solution!!
|
|
||||||
|
|
||||||
expect(TripletClue(a.solution, b.solution, c.solution).isValid(grid)).toEqual(true)
|
|
||||||
expect(TripletClue(c.solution, b.solution, a.solution).isValid(grid)).toEqual(true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,20 +36,16 @@ class TripletClueTest : ClueTest() {
|
|||||||
val b = rowB[2]
|
val b = rowB[2]
|
||||||
val c = rowC[3]
|
val c = rowC[3]
|
||||||
|
|
||||||
a.solution!!
|
|
||||||
b.solution!!
|
|
||||||
c.solution!!
|
|
||||||
|
|
||||||
rowB[0].selection = b.solution
|
rowB[0].selection = b.solution
|
||||||
|
|
||||||
expect(TripletClue(a.solution, b.solution, c.solution).isValid(grid)).toEqual(false)
|
expect(TripletClue(a.solution!!, b.solution!!, c.solution!!).isValid(grid)).toEqual(false)
|
||||||
expect(TripletClue(c.solution, b.solution, a.solution).isValid(grid)).toEqual(false)
|
expect(TripletClue(c.solution!!, b.solution!!, a.solution!!).isValid(grid)).toEqual(false)
|
||||||
|
|
||||||
rowB[0].selection = null
|
rowB[0].selection = null
|
||||||
rowB[grid.size - 1].selection = b.solution
|
rowB[grid.size - 1].selection = b.solution
|
||||||
|
|
||||||
expect(TripletClue(a.solution, b.solution, c.solution).isValid(grid)).toEqual(false)
|
expect(TripletClue(a.solution!!, b.solution!!, c.solution!!).isValid(grid)).toEqual(false)
|
||||||
expect(TripletClue(c.solution, b.solution, a.solution).isValid(grid)).toEqual(false)
|
expect(TripletClue(c.solution!!, b.solution!!, a.solution!!).isValid(grid)).toEqual(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -69,14 +61,10 @@ class TripletClueTest : ClueTest() {
|
|||||||
val rowC = grid[1]
|
val rowC = grid[1]
|
||||||
val c = rowC[ic]
|
val c = rowC[ic]
|
||||||
|
|
||||||
a.solution!!
|
val clue = TripletClue(a.solution!!, b.solution!!, c.solution!!)
|
||||||
b.solution!!
|
|
||||||
c.solution!!
|
|
||||||
|
|
||||||
val clue = TripletClue(a.solution, b.solution, c.solution)
|
|
||||||
|
|
||||||
b.selection = b.solution
|
b.selection = b.solution
|
||||||
c.options.add(c.solution)
|
c.options.add(c.solution!!)
|
||||||
|
|
||||||
|
|
||||||
rowA.forEachIndexed { index, notA ->
|
rowA.forEachIndexed { index, notA ->
|
||||||
@@ -87,7 +75,7 @@ class TripletClueTest : ClueTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
index == ic -> {
|
index == ic -> {
|
||||||
rowC[ia].options.add(c.solution)
|
rowC[ia].options.add(c.solution!!)
|
||||||
expect(clue.isValid(grid)).toEqual(true)
|
expect(clue.isValid(grid)).toEqual(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,15 +94,11 @@ class TripletClueTest : ClueTest() {
|
|||||||
val b = grid[0][2]
|
val b = grid[0][2]
|
||||||
val c = grid[1][3]
|
val c = grid[1][3]
|
||||||
|
|
||||||
a.solution!!
|
|
||||||
b.solution!!
|
|
||||||
c.solution!!
|
|
||||||
|
|
||||||
a.selection = a.solution
|
a.selection = a.solution
|
||||||
grid[1][4].selection = c.solution
|
grid[1][4].selection = c.solution
|
||||||
|
|
||||||
expect(TripletClue(a.solution, b.solution, c.solution).isValid(grid)).toEqual(false)
|
expect(TripletClue(a.solution!!, b.solution!!, c.solution!!).isValid(grid)).toEqual(false)
|
||||||
expect(TripletClue(c.solution, b.solution, a.solution).isValid(grid)).toEqual(false)
|
expect(TripletClue(c.solution!!, b.solution!!, a.solution!!).isValid(grid)).toEqual(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -127,19 +111,15 @@ class TripletClueTest : ClueTest() {
|
|||||||
val b = rowB[2]
|
val b = rowB[2]
|
||||||
val c = rowC[1]
|
val c = rowC[1]
|
||||||
|
|
||||||
a.solution!!
|
|
||||||
b.solution!!
|
|
||||||
c.solution!!
|
|
||||||
|
|
||||||
a.selection = a.solution
|
a.selection = a.solution
|
||||||
b.options.clear()
|
b.options.clear()
|
||||||
c.options.clear()
|
c.options.clear()
|
||||||
|
|
||||||
rowB[4].options.add(b.solution)
|
rowB[4].options.add(b.solution!!)
|
||||||
rowC[5].options.add(c.solution)
|
rowC[5].options.add(c.solution!!)
|
||||||
|
|
||||||
expect(TripletClue(a.solution, b.solution, c.solution).isValid(grid)).toEqual(true)
|
expect(TripletClue(a.solution!!, b.solution!!, c.solution!!).isValid(grid)).toEqual(true)
|
||||||
expect(TripletClue(c.solution, b.solution, a.solution).isValid(grid)).toEqual(true)
|
expect(TripletClue(c.solution!!, b.solution!!, a.solution!!).isValid(grid)).toEqual(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -152,15 +132,11 @@ class TripletClueTest : ClueTest() {
|
|||||||
val b = rowB[2]
|
val b = rowB[2]
|
||||||
val c = rowC[1]
|
val c = rowC[1]
|
||||||
|
|
||||||
a.solution!!
|
|
||||||
b.solution!!
|
|
||||||
c.solution!!
|
|
||||||
|
|
||||||
a.selection = a.solution
|
a.selection = a.solution
|
||||||
rowB[4].selection = rowC[3].solution
|
rowB[4].selection = rowC[3].solution
|
||||||
c.selection = rowC[3].solution
|
c.selection = rowC[3].solution
|
||||||
|
|
||||||
expect(TripletClue(a.solution, b.solution, c.solution).isValid(grid)).toEqual(false)
|
expect(TripletClue(a.solution!!, b.solution!!, c.solution!!).isValid(grid)).toEqual(false)
|
||||||
expect(TripletClue(c.solution, b.solution, a.solution).isValid(grid)).toEqual(false)
|
expect(TripletClue(c.solution!!, b.solution!!, a.solution!!).isValid(grid)).toEqual(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
<url type="vcs-browser">https://git.dissem.ch/chris/YAEP</url>
|
<url type="vcs-browser">https://git.dissem.ch/chris/YAEP</url>
|
||||||
|
|
||||||
<releases>
|
<releases>
|
||||||
<release date="2025-11-29" version="1.0.0">
|
<release date="2025-11-29" version="0.0.0">
|
||||||
<description>
|
<description>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Initial release</li>
|
<li>Initial release</li>
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
[versions]
|
[versions]
|
||||||
app-version-code = "1"
|
app-version-code = "1"
|
||||||
app-version-name = "1.0.0"
|
app-version-name = "1.0.0"
|
||||||
agp = "8.13.2"
|
agp = "8.13.0"
|
||||||
jdk = "21"
|
jdk = "21"
|
||||||
android-compileSdk = "36"
|
android-compileSdk = "36"
|
||||||
android-minSdk = "26"
|
android-minSdk = "26"
|
||||||
android-targetSdk = "36"
|
android-targetSdk = "36"
|
||||||
androidx-activityCompose = "1.12.2"
|
androidx-activityCompose = "1.11.0"
|
||||||
androidx-compose = "1.10.0"
|
androidx-compose = "1.9.4"
|
||||||
compose-plugin = "1.9.3"
|
compose-plugin = "1.9.2"
|
||||||
kotlin = "2.3.0"
|
kotlin = "2.2.21"
|
||||||
coreKtx = "1.17.0"
|
coreKtx = "1.17.0"
|
||||||
atrium = "1.2.0"
|
atrium = "1.2.0"
|
||||||
|
|
||||||
@@ -19,25 +19,28 @@ androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx"
|
|||||||
androidx-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-compose" }
|
androidx-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-compose" }
|
||||||
androidx-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose" }
|
androidx-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose" }
|
||||||
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose" }
|
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose" }
|
||||||
|
androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidx-compose" }
|
||||||
|
androidx-compose-ui-test-android = { module = "androidx.compose.ui:ui-test-junit4-android", version.ref = "androidx-compose" }
|
||||||
|
|
||||||
atrium = { module = "ch.tutteli.atrium:atrium-fluent", version.ref = "atrium" }
|
atrium = { module = "ch.tutteli.atrium:atrium-fluent", version.ref = "atrium" }
|
||||||
|
|
||||||
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
|
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
|
||||||
|
|
||||||
logging-jvm = { module = "io.github.oshai:kotlin-logging-jvm", version = "7.0.14" }
|
logging-jvm = { module = "io.github.oshai:kotlin-logging-jvm", version = "7.0.13" }
|
||||||
logging-slf4j = { module = "org.slf4j:slf4j-simple", version = "2.0.17" }
|
logging-slf4j = { module = "org.slf4j:slf4j-simple", version = "2.0.17" }
|
||||||
|
|
||||||
[bundles]
|
[bundles]
|
||||||
logging = ["logging-jvm", "logging-slf4j"]
|
logging = ["logging-jvm", "logging-slf4j"]
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
|
versioning = { id = "me.qoomon.git-versioning", version = "6.4.4"}
|
||||||
versions = { id = "com.github.ben-manes.versions", version = "0.53.0" }
|
versions = { id = "com.github.ben-manes.versions", version = "0.53.0" }
|
||||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
android-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" }
|
android-library = { id = "com.android.library", version.ref = "agp" }
|
||||||
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
||||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||||
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||||
compose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
|
compose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
|
||||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||||
sonarqube = { id = "org.sonarqube", version = "7.2.2.6593" }
|
sonarqube = { id = "org.sonarqube", version = "7.0.1.6134" }
|
||||||
kotlin-kover = { id = "org.jetbrains.kotlinx.kover", version = "0.9.4" }
|
kotlin-kover = { id = "org.jetbrains.kotlinx.kover", version = "0.9.3" }
|
||||||
Reference in New Issue
Block a user