Skip to content

Commit

Permalink
Merge pull request #117 from kaleidot725/develop-v1.5.0
Browse files Browse the repository at this point in the history
Merge develop v1.5.0
  • Loading branch information
kaleidot725 authored Jan 13, 2025
2 parents 1eaf434 + b7cc559 commit 0e5ca1b
Show file tree
Hide file tree
Showing 26 changed files with 374 additions and 154 deletions.
8 changes: 8 additions & 0 deletions .idea/artifacts/adbpad_jvm_1_5_0.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ end

# Notify ktlint warning
checkstyle_format.base_path = Dir.pwd
checkstyle_format.report 'build/reports/ktlint/ktlintJvmMainSourceSetCheck/ktlintJvmMainSourceSetCheck.xml'
checkstyle_format.report 'build/reports/ktlint/ktlintJvmMainSourceSetCheck/ktlintJvmMainSourceSetCheck.xml'
67 changes: 34 additions & 33 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
import org.gradle.internal.impldep.org.junit.experimental.categories.Categories.CategoryFilter.exclude
import org.jetbrains.compose.reload.ComposeHotRun
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeFeatureFlag

plugins {
alias(libs.plugins.multiplatform)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.compose.hot.reload)
alias(libs.plugins.kotlinx.serialization)
alias(libs.plugins.ktlint)
}

group = "jp.kaleidot725"
version = "1.3.0"

repositories {
mavenCentral()
google()
maven("https://packages.jetbrains.team/maven/p/kpm/public/")
maven { url = uri("https://jitpack.io") }
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
}
version = "1.5.0"

kotlin {
jvm {
jvm()
jvmToolchain(17)

composeCompiler {
featureFlags.add(ComposeFeatureFlag.OptimizeNonSkippingGroups)
}
sourceSets {
val jvmMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
implementation(compose.material)
implementation(compose.materialIconsExtended)
implementation(libs.adam)
implementation(libs.lucide)
implementation(libs.kotlin.coroutines)
implementation(libs.kotlinx.coroutines.swing)
implementation(libs.kotlin.serialization)
implementation(libs.koin)
implementation(libs.ktor.core)
implementation(libs.ktor.client.okhttp)
implementation(libs.jSystemThemeDetectorVer)
}
}
val jvmTest by getting {
dependencies {
implementation(libs.junit5)
}
}

sourceSets.jvmMain.dependencies {
implementation(compose.desktop.currentOs)
implementation(compose.material)
implementation(compose.materialIconsExtended)
implementation(libs.adam)
implementation(libs.lucide)
implementation(libs.kotlin.coroutines)
implementation(libs.kotlinx.coroutines.swing)
implementation(libs.kotlin.serialization)
implementation(libs.koin)
implementation(libs.ktor.core)
implementation(libs.ktor.client.okhttp)
implementation(libs.jSystemThemeDetectorVer)
implementation(libs.coil)
implementation(libs.hot.reload.core)
implementation(libs.hot.reload.analysis)
}
sourceSets.jvmTest.dependencies {
implementation(libs.junit5)
}
}

Expand Down Expand Up @@ -115,3 +111,8 @@ configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
include("**/kotlin/**")
}
}

// build.gradle.kts
tasks.register<ComposeHotRun>("runHot") {
mainClass.set("MainKt")
}
16 changes: 12 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[versions]
kotlin="2.0.21"
kotlin="2.1.10-RC"
compose_reload_kotlin = "2.1.10-firework.33"
kotlin_coroutines="1.9.0"
kotlin_serialization="1.7.3"
compose_hot_reload = "1.0.0-dev.33.1"
compose="1.7.3"
ktlint_plugin="12.1.1"
adam="0.5.8"
Expand All @@ -10,6 +12,7 @@ koin="4.0.0"
system_theme_detector="3.8"
ktor = "3.0.1"
lucide = "1.0.0"
coil = "3.0.4"

[libraries]
adam = { module = "com.malinskiy.adam:adam", version.ref = "adam" }
Expand All @@ -22,10 +25,15 @@ jSystemThemeDetectorVer = { module = "com.github.Dansoftowner:jSystemThemeDetect
ktor-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
lucide = { module = "com.composables:icons-lucide", version.ref = "lucide" }
coil = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil" }
hot-reload-core = { module = "org.jetbrains.compose:hot-reload-core", version.ref = "compose_hot_reload" }
hot-reload-analysis = { module = "org.jetbrains.compose:hot-reload-analysis", version.ref = "compose_hot_reload" }

[plugins]
multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "compose_reload_kotlin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "compose_reload_kotlin" }
compose-hot-reload = { id = "org.jetbrains.compose-hot-reload", version.ref = "compose_hot_reload" }

compose = { id = "org.jetbrains.compose", version.ref = "compose" }
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "compose_reload_kotlin" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint_plugin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
13 changes: 10 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,24 @@ pluginManagement {
google()
gradlePluginPortal()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://maven.hq.hydraulic.software")
maven(file("../..//build/repo"))
maven("https://packages.jetbrains.team/maven/p/firework/dev")
}
}

dependencyResolutionManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
mavenCentral()
maven(file("../..//build/repo"))
maven("https://packages.jetbrains.team/maven/p/firework/dev")
maven("https://jitpack.io")
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

rootProject.name = "adbpad"
12 changes: 11 additions & 1 deletion src/jvmMain/kotlin/jp/kaleidot725/adbpad/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import jp.kaleidot725.adbpad.ui.screen.setting.SettingScreen
import jp.kaleidot725.adbpad.ui.screen.setting.SettingStateHolder
import jp.kaleidot725.adbpad.ui.screen.text.TextCommandScreen
import jp.kaleidot725.adbpad.ui.section.TopSection
import org.jetbrains.compose.reload.DevelopmentEntryPoint
import org.koin.core.context.GlobalContext
import org.koin.core.context.startKoin

Expand Down Expand Up @@ -64,7 +65,9 @@ fun main() {
onCloseRequest = ::exitApplication,
state = windowState,
) {
App(mainStateHolder)
DevelopmentEntryPoint {
App(mainStateHolder)
}
}
}
}
Expand Down Expand Up @@ -162,9 +165,13 @@ fun WindowScope.App(mainStateHolder: MainStateHolder) {

ScreenshotScreen(
screenshot = screenshotState.preview,
screenshots = screenshotState.previews,
canCapture = screenshotState.canExecute,
isCapturing = screenshotState.isCapturing,
commands = screenshotState.commands,
onOpenDirectory = {
screenshotStateHolder.openDirectory()
},
onCopyScreenshot = {
screenshotStateHolder.copyScreenShotToClipboard()
},
Expand All @@ -176,6 +183,9 @@ fun WindowScope.App(mainStateHolder: MainStateHolder) {
screenshot,
)
},
onSelectScreenshot = { screenshot ->
screenshotStateHolder.selectScreenshot(screenshot)
},
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import jp.kaleidot725.adbpad.domain.usecase.device.UpdateDevicesUseCase
import jp.kaleidot725.adbpad.domain.usecase.language.GetLanguageUseCase
import jp.kaleidot725.adbpad.domain.usecase.language.SaveLanguageUseCase
import jp.kaleidot725.adbpad.domain.usecase.refresh.RefreshUseCase
import jp.kaleidot725.adbpad.domain.usecase.screenshot.CopyScreenshotToClipboardUseCase
import jp.kaleidot725.adbpad.domain.usecase.screenshot.DeleteScreenshotPreviewUseCase
import jp.kaleidot725.adbpad.domain.usecase.screenshot.GetScreenshotCommandUseCase
import jp.kaleidot725.adbpad.domain.usecase.screenshot.TakeScreenshotUseCase
import jp.kaleidot725.adbpad.domain.usecase.sdkpath.GetSdkPathUseCase
Expand Down Expand Up @@ -74,9 +72,6 @@ val domainModule =
factory {
SendUserInputTextCommandUseCase(get())
}
factory {
DeleteScreenshotPreviewUseCase(get())
}
factory {
GetWindowSizeUseCase(get())
}
Expand Down Expand Up @@ -104,9 +99,6 @@ val domainModule =
factory {
GetLanguageUseCase(get())
}
factory {
CopyScreenshotToClipboardUseCase(get())
}
factory {
SendTabCommandUseCase(get())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import jp.kaleidot725.adbpad.domain.model.language.resources.JapaneseResources
import jp.kaleidot725.adbpad.domain.model.language.resources.StringResources

object Language : StringResources {
override val version: String
get() = getCurrentResources().version
override val windowTitle: String
get() = getCurrentResources().windowTitle
override val notFoundDevice: String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package jp.kaleidot725.adbpad.domain.model.language.resources

object ChineseResources : StringResources {
override val version = "v1.4.0"
override val windowTitle = "AdbPad($version)"
override val windowTitle = "AdbPad($APP_VERSION)"

override val notFoundDevice = "未找到设备"
override val notFoundCommand = "未找到命令"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package jp.kaleidot725.adbpad.domain.model.language.resources

object EnglishResources : StringResources {
override val version = "v1.4.0"
override val windowTitle = "AdbPad($version)"
override val windowTitle = "AdbPad($APP_VERSION)"

override val notFoundDevice = "Not found device"
override val notFoundCommand = "Not found command"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package jp.kaleidot725.adbpad.domain.model.language.resources

object JapaneseResources : StringResources {
override val version = "v1.4.0"
override val windowTitle = "AdbPad($version)"
override val windowTitle = "AdbPad($APP_VERSION)"

override val notFoundDevice = "デバイスがありません"
override val notFoundCommand = "コマンドがありません"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package jp.kaleidot725.adbpad.domain.model.language.resources

val APP_VERSION = "v1.5.0"

interface StringResources {
val version: String
val windowTitle: String

val notFoundDevice: String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package jp.kaleidot725.adbpad.domain.model.os

sealed class OSContext(val directory: String = "") {
val screenshotDirectory get() = "${directory}screenshot/"

object Mac : OSContext(System.getProperty("user.home") + "/Library/Application Support/adbpad/")

object Windows : OSContext(System.getProperty("user.home") + "/adbpad/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ interface ScreenshotCommandRepository {
onFailed: suspend () -> Unit,
)

suspend fun getScreenshotCache(): Screenshot
suspend fun getScreenshots(): List<Screenshot>

suspend fun deleteScreenshotCache()
suspend fun delete(screenshot: Screenshot)

fun clear()
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit 0e5ca1b

Please sign in to comment.