diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2026-07-02 21:38:35 +0200 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2026-07-02 21:38:35 +0200 |
| commit | a9af12984995a42db553d573e8284ccc89ffc59d (patch) | |
| tree | 382342f15780480c296ae5abe9231031b4ca2a74 /android | |
| parent | 2b7c14f2b68a26cba893855cd1a142328888bb13 (diff) | |
| download | ding-dong-mail-a9af12984995a42db553d573e8284ccc89ffc59d.tar.gz ding-dong-mail-a9af12984995a42db553d573e8284ccc89ffc59d.tar.zst ding-dong-mail-a9af12984995a42db553d573e8284ccc89ffc59d.zip | |
Diffstat (limited to 'android')
| -rw-r--r-- | android/.idea/AndroidProjectSystem.xml | 6 | ||||
| -rw-r--r-- | android/.idea/codeStyles/Project.xml | 123 | ||||
| -rw-r--r-- | android/.idea/codeStyles/codeStyleConfig.xml | 5 | ||||
| -rw-r--r-- | android/.idea/compiler.xml | 2 | ||||
| -rw-r--r-- | android/.idea/deploymentTargetSelector.xml | 1 | ||||
| -rw-r--r-- | android/.idea/deviceManager.xml | 13 | ||||
| -rw-r--r-- | android/.idea/gradle.xml | 1 | ||||
| -rw-r--r-- | android/.idea/misc.xml | 2 | ||||
| -rw-r--r-- | android/.idea/runConfigurations.xml | 17 | ||||
| -rw-r--r-- | android/app/build.gradle.kts | 4 | ||||
| -rw-r--r-- | android/app/src/main/java/eu/jopek/dingdongmail/MainWorkerService.kt | 26 | ||||
| -rw-r--r-- | android/build.gradle.kts | 1 | ||||
| -rw-r--r-- | android/gradle.properties | 12 | ||||
| -rw-r--r-- | android/gradle/libs.versions.toml | 5 | ||||
| -rw-r--r-- | android/gradle/wrapper/gradle-wrapper.properties | 2 |
15 files changed, 197 insertions, 23 deletions
diff --git a/android/.idea/AndroidProjectSystem.xml b/android/.idea/AndroidProjectSystem.xml new file mode 100644 index 0000000..4a53bee --- /dev/null +++ b/android/.idea/AndroidProjectSystem.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="AndroidProjectSystem"> + <option name="providerId" value="com.android.tools.idea.GradleProjectSystem" /> + </component> +</project>
\ No newline at end of file diff --git a/android/.idea/codeStyles/Project.xml b/android/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..7643783 --- /dev/null +++ b/android/.idea/codeStyles/Project.xml @@ -0,0 +1,123 @@ +<component name="ProjectCodeStyleConfiguration"> + <code_scheme name="Project" version="173"> + <JetCodeStyleSettings> + <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" /> + </JetCodeStyleSettings> + <codeStyleSettings language="XML"> + <option name="FORCE_REARRANGE_MODE" value="1" /> + <indentOptions> + <option name="CONTINUATION_INDENT_SIZE" value="4" /> + </indentOptions> + <arrangement> + <rules> + <section> + <rule> + <match> + <AND> + <NAME>xmlns:android</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>^$</XML_NAMESPACE> + </AND> + </match> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>xmlns:.*</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>^$</XML_NAMESPACE> + </AND> + </match> + <order>BY_NAME</order> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>.*:id</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> + </AND> + </match> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>.*:name</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> + </AND> + </match> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>name</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>^$</XML_NAMESPACE> + </AND> + </match> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>style</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>^$</XML_NAMESPACE> + </AND> + </match> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>.*</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>^$</XML_NAMESPACE> + </AND> + </match> + <order>BY_NAME</order> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>.*</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> + </AND> + </match> + <order>ANDROID_ATTRIBUTE_ORDER</order> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>.*</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>.*</XML_NAMESPACE> + </AND> + </match> + <order>BY_NAME</order> + </rule> + </section> + </rules> + </arrangement> + </codeStyleSettings> + <codeStyleSettings language="kotlin"> + <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" /> + </codeStyleSettings> + </code_scheme> +</component>
\ No newline at end of file diff --git a/android/.idea/codeStyles/codeStyleConfig.xml b/android/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/android/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ +<component name="ProjectCodeStyleConfiguration"> + <state> + <option name="USE_PER_PROJECT_SETTINGS" value="true" /> + </state> +</component>
\ No newline at end of file diff --git a/android/.idea/compiler.xml b/android/.idea/compiler.xml index b589d56..b86273d 100644 --- a/android/.idea/compiler.xml +++ b/android/.idea/compiler.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="CompilerConfiguration"> - <bytecodeTargetLevel target="17" /> + <bytecodeTargetLevel target="21" /> </component> </project>
\ No newline at end of file diff --git a/android/.idea/deploymentTargetSelector.xml b/android/.idea/deploymentTargetSelector.xml index b268ef3..ca16a99 100644 --- a/android/.idea/deploymentTargetSelector.xml +++ b/android/.idea/deploymentTargetSelector.xml @@ -4,6 +4,7 @@ <selectionStates> <SelectionState runConfigName="app"> <option name="selectionMode" value="DROPDOWN" /> + <DialogSelection /> </SelectionState> </selectionStates> </component> diff --git a/android/.idea/deviceManager.xml b/android/.idea/deviceManager.xml new file mode 100644 index 0000000..91f9558 --- /dev/null +++ b/android/.idea/deviceManager.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="DeviceTable"> + <option name="columnSorters"> + <list> + <ColumnSorterState> + <option name="column" value="Name" /> + <option name="order" value="ASCENDING" /> + </ColumnSorterState> + </list> + </option> + </component> +</project>
\ No newline at end of file diff --git a/android/.idea/gradle.xml b/android/.idea/gradle.xml index 0897082..7b3006b 100644 --- a/android/.idea/gradle.xml +++ b/android/.idea/gradle.xml @@ -4,6 +4,7 @@ <component name="GradleSettings"> <option name="linkedExternalProjectsSettings"> <GradleProjectSettings> + <option name="testRunner" value="CHOOSE_PER_TEST" /> <option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" /> <option name="modules"> diff --git a/android/.idea/misc.xml b/android/.idea/misc.xml index 8978d23..b2c751a 100644 --- a/android/.idea/misc.xml +++ b/android/.idea/misc.xml @@ -1,6 +1,6 @@ <project version="4"> <component name="ExternalStorageConfigurationManager" enabled="true" /> - <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/build/classes" /> </component> <component name="ProjectType"> diff --git a/android/.idea/runConfigurations.xml b/android/.idea/runConfigurations.xml new file mode 100644 index 0000000..16660f1 --- /dev/null +++ b/android/.idea/runConfigurations.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RunConfigurationProducerService"> + <option name="ignoredProducers"> + <set> + <option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" /> + <option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" /> + <option value="com.intellij.execution.junit.PatternConfigurationProducer" /> + <option value="com.intellij.execution.junit.TestInClassConfigurationProducer" /> + <option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" /> + <option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" /> + <option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" /> + <option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" /> + </set> + </option> + </component> +</project>
\ No newline at end of file diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 7de522a..50921a5 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,6 +1,7 @@ plugins { alias(libs.plugins.android.application) alias(libs.plugins.jetbrains.kotlin.android) + alias(libs.plugins.kotlin.compose) } android { @@ -42,9 +43,6 @@ android { buildFeatures { compose = true } - composeOptions { - kotlinCompilerExtensionVersion = "1.5.1" - } packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" diff --git a/android/app/src/main/java/eu/jopek/dingdongmail/MainWorkerService.kt b/android/app/src/main/java/eu/jopek/dingdongmail/MainWorkerService.kt index 4991c3a..f28682b 100644 --- a/android/app/src/main/java/eu/jopek/dingdongmail/MainWorkerService.kt +++ b/android/app/src/main/java/eu/jopek/dingdongmail/MainWorkerService.kt @@ -21,9 +21,7 @@ import android.widget.Toast import eu.jopek.dingdongmail.ui.theme.DingDongMailTheme fun log(str: String) { - if (BuildConfig.DEBUG) { Log.d("Ding-Dong Mail", str) - } } enum class Actions { @@ -77,12 +75,12 @@ class MainWorkerService : Service() { isServiceStarted = true // we need this lock so our service gets not affected by Doze Mode - wakeLock = - (getSystemService(Context.POWER_SERVICE) as PowerManager).run { - newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "DingDongMail::lock").apply { - acquire() - } - } +// wakeLock = +// (getSystemService(Context.POWER_SERVICE) as PowerManager).run { +// newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "DingDongMail::lock").apply { +// acquire() +// } +// } val i = Intent("eu.faircode.email.DISABLE").apply { setPackage("eu.faircode.email") @@ -96,7 +94,7 @@ class MainWorkerService : Service() { override fun onReceive(context: Context, intent: Intent) { val msg = intent.getStringExtra("message") ?: return val (email, _mailbox) = msg.split(":", ignoreCase = false, limit = 2) - log("email: $email") +// log("email: $email") val i = Intent("eu.faircode.email.POLL").apply { setPackage("eu.faircode.email") putExtra("account", email) @@ -112,11 +110,11 @@ class MainWorkerService : Service() { setPackage("eu.faircode.email") } startService(i) - wakeLock?.let { - if (it.isHeld) { - it.release() - } - } +// wakeLock?.let { +// if (it.isHeld) { +// it.release() +// } +// } stopSelf() unregisterReceiver(receiver) isServiceStarted = false diff --git a/android/build.gradle.kts b/android/build.gradle.kts index f74b04b..c8672e5 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -2,4 +2,5 @@ plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.jetbrains.kotlin.android) apply false + alias(libs.plugins.kotlin.compose) apply false }
\ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties index 20e2a01..4540b75 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -20,4 +20,14 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true
\ No newline at end of file +android.nonTransitiveRClass=true +android.defaults.buildfeatures.resvalues=true +android.sdk.defaultTargetSdkToCompileSdkIfUnset=false +android.enableAppCompileTimeRClass=false +android.usesSdkInManifest.disallowed=false +android.uniquePackageNames=false +android.dependency.useConstraints=true +android.r8.strictFullModeForKeepRules=false +android.r8.optimizedResourceShrinking=false +android.builtInKotlin=false +android.newDsl=false
\ No newline at end of file diff --git a/android/gradle/libs.versions.toml b/android/gradle/libs.versions.toml index e1bc89b..c5a0ab4 100644 --- a/android/gradle/libs.versions.toml +++ b/android/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -agp = "8.4.0" -kotlin = "1.9.0" +agp = "9.2.1" +kotlin = "2.2.10" coreKtx = "1.13.1" junit = "4.13.2" junitVersion = "1.1.5" @@ -28,4 +28,5 @@ androidx-material3 = { group = "androidx.compose.material3", name = "material3" [plugins] android-application = { id = "com.android.application", version.ref = "agp" } jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index f01597a..42efac6 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed May 22 21:04:46 CEST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists |
