From 7bbbb022e36beada7b00c03af8f9f36b5c7fb7ad Mon Sep 17 00:00:00 2001 From: William Brawner Date: Tue, 22 Aug 2023 22:13:17 -0600 Subject: [PATCH] Implement desktop builds --- .idea/androidTestResultsUserPreferences.xml | 43 ++++++ .idea/artifacts/shared_desktop.xml | 8 + .idea/compiler.xml | 2 +- .idea/deploymentTargetDropDown.xml | 22 +++ .idea/gradle.xml | 6 +- .idea/jarRepositories.xml | 5 + .idea/kotlinScripting.xml | 9 -- .idea/kotlinc.xml | 6 + .idea/misc.xml | 7 +- .idea/uiDesigner.xml | 124 ++++++++++++++++ .idea/vcs.xml | 1 + .../wbrawner/pihelper/util/AddScreenRobot.kt | 16 +- .../wbrawner/pihelper/util/AuthScreenRobot.kt | 2 +- .../wbrawner/pihelper/util/MainScreenRobot.kt | 8 +- .../java/com/wbrawner/pihelper/AddScreen.kt | 119 +-------------- .../com/wbrawner/pihelper/DayNightPreview.kt | 8 + .../com/wbrawner/pihelper/MainActivity.kt | 41 ++---- .../java/com/wbrawner/pihelper/ScanScreen.kt | 2 +- build.gradle.kts | 3 + gradle.properties | 1 + gradle/libs.versions.toml | 40 ++--- settings.gradle.kts | 1 + shared/build.gradle.kts | 17 ++- .../com/wbrawner/pihelper/shared/Android.kt | 5 - .../pihelper/shared/PiholeAPIService.kt | 5 + .../com/wbrawner/pihelper/shared/Responses.kt | 49 +----- .../com/wbrawner/pihelper/shared/Store.kt | 1 + .../wbrawner/pihelper/shared/ui/AddScreen.kt | 120 +++++++++++++++ .../pihelper/shared/ui}/AuthScreen.kt | 16 +- .../pihelper/shared/ui}/InfoScreen.kt | 27 +--- .../pihelper/shared/ui}/MainScreen.kt | 139 ++++++++---------- .../shared/ui/component/LoadingSpinner.kt | 33 +++++ .../shared/ui/component/PrimaryButton.kt | 27 ++++ .../pihelper/shared/ui/theme}/Color.kt | 2 +- .../pihelper/shared/ui/theme}/Shape.kt | 2 +- .../pihelper/shared/ui/theme}/Theme.kt | 31 +--- .../pihelper/shared/ui/theme}/Type.kt | 2 +- .../commonMain/resources/img/ic_app_logo.xml | 18 +++ .../com/wbrawner/pihelper/shared/Desktop.kt | 23 +++ 39 files changed, 611 insertions(+), 380 deletions(-) create mode 100644 .idea/artifacts/shared_desktop.xml create mode 100644 .idea/deploymentTargetDropDown.xml delete mode 100644 .idea/kotlinScripting.xml create mode 100644 .idea/kotlinc.xml create mode 100644 .idea/uiDesigner.xml create mode 100644 app/src/main/java/com/wbrawner/pihelper/DayNightPreview.kt create mode 100644 shared/src/commonMain/kotlin/com/wbrawner/pihelper/shared/ui/AddScreen.kt rename {app/src/main/java/com/wbrawner/pihelper => shared/src/commonMain/kotlin/com/wbrawner/pihelper/shared/ui}/AuthScreen.kt (92%) rename {app/src/main/java/com/wbrawner/pihelper => shared/src/commonMain/kotlin/com/wbrawner/pihelper/shared/ui}/InfoScreen.kt (86%) rename {app/src/main/java/com/wbrawner/pihelper => shared/src/commonMain/kotlin/com/wbrawner/pihelper/shared/ui}/MainScreen.kt (87%) create mode 100644 shared/src/commonMain/kotlin/com/wbrawner/pihelper/shared/ui/component/LoadingSpinner.kt create mode 100644 shared/src/commonMain/kotlin/com/wbrawner/pihelper/shared/ui/component/PrimaryButton.kt rename {app/src/main/java/com/wbrawner/pihelper/ui => shared/src/commonMain/kotlin/com/wbrawner/pihelper/shared/ui/theme}/Color.kt (78%) rename {app/src/main/java/com/wbrawner/pihelper/ui => shared/src/commonMain/kotlin/com/wbrawner/pihelper/shared/ui/theme}/Shape.kt (86%) rename {app/src/main/java/com/wbrawner/pihelper/ui => shared/src/commonMain/kotlin/com/wbrawner/pihelper/shared/ui/theme}/Theme.kt (57%) rename {app/src/main/java/com/wbrawner/pihelper/ui => shared/src/commonMain/kotlin/com/wbrawner/pihelper/shared/ui/theme}/Type.kt (90%) create mode 100644 shared/src/commonMain/resources/img/ic_app_logo.xml create mode 100644 shared/src/desktopMain/kotlin/com/wbrawner/pihelper/shared/Desktop.kt diff --git a/.idea/androidTestResultsUserPreferences.xml b/.idea/androidTestResultsUserPreferences.xml index af6a4f9..5c15dcf 100644 --- a/.idea/androidTestResultsUserPreferences.xml +++ b/.idea/androidTestResultsUserPreferences.xml @@ -126,6 +126,7 @@ diff --git a/.idea/artifacts/shared_desktop.xml b/.idea/artifacts/shared_desktop.xml new file mode 100644 index 0000000..c9e4707 --- /dev/null +++ b/.idea/artifacts/shared_desktop.xml @@ -0,0 +1,8 @@ + + + $PROJECT_DIR$/shared/build/libs + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml index fb7f4a8..b589d56 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml new file mode 100644 index 0000000..99d4b26 --- /dev/null +++ b/.idea/deploymentTargetDropDown.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index e900b00..2586163 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,17 +4,17 @@ diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml index 147f384..e2c417b 100644 --- a/.idea/jarRepositories.xml +++ b/.idea/jarRepositories.xml @@ -31,5 +31,10 @@