Skip to content

Commit 31a08d3

Browse files
committed
review: review fixes
1 parent cdc6150 commit 31a08d3

File tree

7 files changed

+6
-51
lines changed

7 files changed

+6
-51
lines changed

buildSrc/build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
1111
compilerOptions.jvmTarget.set(JvmTarget.JVM_17)
1212
}
1313

14-
java {
15-
targetCompatibility = JavaVersion.VERSION_17
16-
sourceCompatibility = JavaVersion.VERSION_17
14+
kotlin {
15+
jvmToolchain(17)
1716
}
1817

1918
dependencies {

buildSrc/src/main/kotlin/convention.debug.panel.plugin.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ android {
2525
)
2626
}
2727
}
28-
29-
compileOptions {
30-
sourceCompatibility = JavaVersion.VERSION_17
31-
targetCompatibility = JavaVersion.VERSION_17
32-
}
3328
}
3429

3530
kotlin {
@@ -39,4 +34,4 @@ kotlin {
3934

4035
dependencies {
4136
implementation(project(":panel-core"))
42-
}
37+
}

panel-core/build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ android {
2727
}
2828
}
2929

30-
compileOptions {
31-
sourceCompatibility = JavaVersion.VERSION_17
32-
targetCompatibility = JavaVersion.VERSION_17
33-
}
34-
3530
kotlin {
3631
jvmToolchain(17)
3732
}

panel-no-op/build.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ android {
2626
}
2727
}
2828

29-
compileOptions {
30-
sourceCompatibility = JavaVersion.VERSION_17
31-
targetCompatibility = JavaVersion.VERSION_17
32-
}
33-
3429
kotlin {
3530
jvmToolchain(17)
3631
}
@@ -39,7 +34,7 @@ android {
3934
}
4035

4136
dependencies {
42-
implementation(kotlin("stdlib"))
37+
implementation(stack.kotlin.stdlib)
4338
implementation(androidx.appcompat)
4439
implementation(stack.okhttp)
4540
implementation(stack.kotlinx.coroutines.android)

panel-no-op/src/main/kotlin/com/redmadrobot/debug/noop/plugin/aboutapp/AboutAppPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ package com.redmadrobot.debug.plugin.aboutapp
22

33
@Suppress("UnusedPrivateProperty")
44
class AboutAppPlugin(
5-
private val appInfoList: List<AboutAppInfo> = emptyList()
5+
private val appInfoList: List<AboutAppInfo>
66
)

sample/build.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ android {
1212
targetSdk = Project.TARGET_SDK
1313
}
1414

15-
compileOptions {
16-
sourceCompatibility = JavaVersion.VERSION_17
17-
targetCompatibility = JavaVersion.VERSION_17
18-
}
19-
2015
buildTypes {
2116
getByName("release") {
2217
signingConfig = signingConfigs.getByName("debug")
@@ -29,7 +24,7 @@ kotlin {
2924
}
3025

3126
dependencies {
32-
implementation(kotlin("stdlib"))
27+
implementation(stack.kotlin.stdlib)
3328
implementation(androidx.appcompat)
3429
implementation(androidx.activity.compose)
3530
implementation(androidx.lifecycle.runtime)

sample/src/main/kotlin/com/redmadrobot/debug_sample/MainActivity.kt

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ import androidx.compose.ui.Modifier
1818
import androidx.compose.ui.unit.dp
1919
import androidx.lifecycle.lifecycleScope
2020
import com.redmadrobot.debug.core.DebugPanel
21-
import com.redmadrobot.debug.plugin.servers.ServerSelectedEvent
2221
import com.redmadrobot.debug_sample.network.ApiFactory
2322
import kotlinx.coroutines.Dispatchers
24-
import kotlinx.coroutines.flow.launchIn
25-
import kotlinx.coroutines.flow.onEach
2623
import kotlinx.coroutines.launch
2724
import kotlinx.coroutines.withContext
2825

@@ -31,7 +28,6 @@ class MainActivity : AppCompatActivity() {
3128
super.onCreate(savedInstanceState)
3229

3330
setContent { MainActivityScreen() }
34-
observeDebugPanelEvents()
3531
}
3632

3733
@Composable
@@ -65,26 +61,6 @@ class MainActivity : AppCompatActivity() {
6561
}
6662
}
6763

68-
private fun observeDebugPanelEvents() {
69-
DebugPanel.subscribeToEvents(this) { event ->
70-
when (event) {
71-
is ServerSelectedEvent -> {
72-
//Обработка выбора сервера
73-
}
74-
}
75-
}
76-
77-
DebugPanel.observeEvents()
78-
.onEach { event ->
79-
when (event) {
80-
is ServerSelectedEvent -> {
81-
//Обработка выбора сервера
82-
}
83-
}
84-
}
85-
.launchIn(lifecycleScope)
86-
}
87-
8864
private fun makeTestRequest() {
8965
lifecycleScope.launch {
9066
var requestedUrl: String? = null

0 commit comments

Comments
 (0)