Skip to content

Commit

Permalink
Merge 2024.1 to main
Browse files Browse the repository at this point in the history
  • Loading branch information
delacrixmorgan committed Aug 27, 2024
1 parent 71dc309 commit 340804c
Show file tree
Hide file tree
Showing 162 changed files with 7,903 additions and 508 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ xcuserdata
!src/**/build/
local.properties
.idea
.kotlin
.DS_Store
captures
.externalNativeBuild
Expand Down
172 changes: 172 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

96 changes: 96 additions & 0 deletions PRIVACY_POLICY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
## Privacy Policy

Delacrix Morgan built the Twilight app as a Free and Open Source app. This SERVICE is provided by
Delacrix Morgan at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure
of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation
to this policy. The Personal Information that I collect is used for providing and improving the
Service. I will not use or share your information with anyone except as described in this Privacy
Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which
is accessible at Twilight unless otherwise defined in this Privacy Policy.

**Information Collection and Use**

For a better experience, while using our Service, I may require you to provide us with certain
personally identifiable information. The information that I request will be retained on your device
and is not collected by me in any way.

The app does use third party services that may collect information used to identify you.

Link to privacy policy of third party service providers used by the app

* [Google Play Services](https://www.google.com/policies/privacy/)
* [Firebase Analytics](https://firebase.google.com/policies/analytics)

**Log Data**

I want to inform you that whenever you use my Service, in a case of an error in the app I collect
data and information (through third party products) on your phone called Log Data. This Log Data may
include information such as your device Internet Protocol (“IP”) address, device name, operating
system version, the configuration of the app when utilizing my Service, the time and date of your
use of the Service, and other statistics.

**Cookies**

Cookies are files with a small amount of data that are commonly used as anonymous unique
identifiers. These are sent to your browser from the websites that you visit and are stored on your
device's internal memory.

This Service does not use these “cookies” explicitly. However, the app may use third party code and
libraries that use “cookies” to collect information and improve their services. You have the option
to either accept or refuse these cookies and know when a cookie is being sent to your device. If you
choose to refuse our cookies, you may not be able to use some portions of this Service.

**Service Providers**

I may employ third-party companies and individuals due to the following reasons:

* To facilitate our Service;
* To provide the Service on our behalf;
* To perform Service-related services; or
* To assist us in analyzing how our Service is used.

I want to inform users of this Service that these third parties have access to your Personal
Information. The reason is to perform the tasks assigned to them on our behalf. However, they are
obligated not to disclose or use the information for any other purpose.

**Security**

I value your trust in providing us your Personal Information, thus we are striving to use
commercially acceptable means of protecting it. But remember that no method of transmission over the
internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its
absolute security.

**Links to Other Sites**

This Service may contain links to other sites. If you click on a third-party link, you will be
directed to that site. Note that these external sites are not operated by me. Therefore, I strongly
advise you to review the Privacy Policy of these websites. I have no control over and assume no
responsibility for the content, privacy policies, or practices of any third-party sites or services.

**Children’s Privacy**

These Services do not address anyone under the age of 13\. I do not knowingly collect personally
identifiable information from children under 13\. In the case I discover that a child under 13 has
provided me with personal information, I immediately delete this from our servers. If you are a
parent or guardian and you are aware that your child has provided us with personal information,
please contact me so that I will be able to do necessary actions.

**Changes to This Privacy Policy**

I may update our Privacy Policy from time to time. Thus, you are advised to review this page
periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on
this page. These changes are effective immediately after they are posted on this page.

**Contact Us**

If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me.

This privacy policy page was created
at [privacypolicytemplate.net](https://privacypolicytemplate.net) and modified/generated
by [App Privacy Policy Generator](https://app-privacy-policy-generator.firebaseapp.com/)
82 changes: 66 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,72 @@
This is a Kotlin Multiplatform project targeting Android, iOS, Web, Desktop.
# Twilight - Timezone Tracker

* `/composeApp` is for code that will be shared across your Compose Multiplatform applications.
It contains several subfolders:
- `commonMain` is for code that’s common for all targets.
- Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name.
For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app,
`iosMain` would be the right folder for such calls.
## Overview

* `/iosApp` contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform,
you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.
Personalise your timezones with the ability to time travel! 🕓

## Description

Learn more about [Kotlin Multiplatform](https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html),
[Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/#compose-multiplatform),
[Kotlin/Wasm](https://kotl.in/wasm/)
Twilight is a timezone tracking app that makes convert time fun like a fidget spinner. You can easily add fun little nicknames to your locations and travel ahead in time to settle on your next
gaming session!

**Note:** Compose/Web is Experimental and may be changed at any time. Use it only for evaluation purposes.
We would appreciate your feedback on Compose/Web and Kotlin/Wasm in the public Slack channel [#compose-web](https://slack-chats.kotlinlang.org/c/compose-web).
If you face any issues, please report them on [GitHub](https://github.com/JetBrains/compose-multiplatform/issues).
**a) Customisable Names**

You can open the web application by running the `:composeApp:wasmJsBrowserDevelopmentRun` Gradle task.
💬 Do you have friends and family that lives in different countries with annoying timezones and you always have trouble knowing whether it is night time at their local time or not?

Fret not! Now, you can have their timezones all in one place with fun little names (optional).

You can just easily add them as:

- “Little Simba 😸”
- “Eggs and Ham 🥚”
- “My Little Princess

💬 Do you work remotely with team members from all around the world and always a pain to setup a meeting time based on everyone's local time?

Sure, you can just Google their local time. But, think about the amount of letters you have to type everytime!

You can just easily add them as:

- "London's Office 🇬🇧"
- "Munich Drinking Buddies 🇩🇪"
- “Japan Animation Team 🇯️🇵️”

**b) Time Travel with the wibbly-wobbly, timey-wimey Spinner**

💬 Yes, you've read that right! You can now travel ahead of time and see what time is it going to be. (Mind blowing, I know).

The measuring tape looking slider, give that a spin and it will transport you through time. You can instantly see the local time of your saved timezones and how they fare up. Then, you can finally make a call with that one of friend of yours without accidentally waking them up.

**c) Dark Mode**

Although the name of the app is Twilight, but we do support both Light and Dark mode. All spectrum of light deserves the same amount of love and attention.

If you made it this far in the description, thank you for your support! Timezones is always been my arch enemy, next to math and physics. Would love to hear about what you think about the app!

In the meantime, go time travel!

[Google Play Store - Twilight Timezone Tracker](https://play.google.com/store/apps/details?id=com.delacrixmorgan.twilight.android)

## Nerdy Stats

- Kotlin Multiplatform
- Date - Kotlinx Datetime
- Dependency Injection - Koin
- Navigation - Compose Navigation
- Local Storage - Data Store, SQL Delight
- Logging - Kermit

## Screenshots

![Today](/screenshots/1_today.png?raw=true "Today")

![Form](/screenshots/2_form.png?raw=true "Form")

## License

```
Twilight © by Delacrix Morgan
Licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
```

[Creative Commons CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/legalcode)
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.jetbrainsCompose) apply false
alias(libs.plugins.composeCompiler) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
}
115 changes: 61 additions & 54 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,41 +1,38 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsCompose)
alias(libs.plugins.composeCompiler)
alias(libs.plugins.sqlDelight)
}

kotlin {
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
moduleName = "composeApp"
browser {
commonWebpackConfig {
outputFileName = "composeApp.js"
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
static = (static ?: mutableListOf()).apply {
// Serve sources to debug inside browser
add(project.projectDir.path)
}
}
}
repositories {
google()
mavenCentral()
}

sqldelight {
databases {
create("TwilightDatabase") {
packageName.set("com.delacrixmorgan.twilight")
}
binaries.executable()
}

}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "11"
compileTaskProvider.configure {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_20)
}
}
}
}

jvm("desktop")


listOf(
iosX64(),
iosArm64(),
Expand All @@ -46,42 +43,65 @@ kotlin {
isStatic = true
}
}

sourceSets {
val desktopMain by getting

androidMain.dependencies {
implementation(libs.compose.ui.tooling.preview)
implementation(libs.androidx.activity.compose)
implementation(libs.koin.android)
implementation(libs.sqldelight.android)
}
iosMain.dependencies {
implementation(libs.sqldelight.native)
}
commonMain.dependencies {
// Common
implementation(libs.kermit)
implementation(libs.kotlinx.serialization.json)
api(libs.kotlinx.datetime)
implementation(project.dependencies.platform(libs.koin.bom))
implementation(libs.koin.core)
implementation(libs.koin.composeVM)
implementation(libs.sqldelight.coroutines.extensions)

// Compose
implementation(project.dependencies.platform(libs.compose.bom))
implementation(libs.compose.icons.extended)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.material3)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)

// AndroidX
implementation(libs.androidx.lifecycle.viewmodel)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.datastore.preference)
}
desktopMain.dependencies {
implementation(compose.desktop.currentOs)
commonTest.dependencies {
implementation(libs.kotlin.test)
implementation(libs.koin.test)
}
}
}

android {
namespace = "com.delacrixmorgan.twilight"
namespace = "com.delacrixmorgan.twilight.android"
compileSdk = libs.versions.android.compileSdk.get().toInt()

sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
sourceSets["main"].res.srcDirs("src/androidMain/res")
sourceSets["main"].resources.srcDirs("src/commonMain/resources")

defaultConfig {
applicationId = "com.delacrixmorgan.twilight"
applicationId = "com.delacrixmorgan.twilight.android"
minSdk = libs.versions.android.minSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
versionCode = 1
versionName = "1.0"
versionCode = 4
versionName = "2024.01"

buildConfigField("int", "VERSION_CODE", versionCode.toString())
buildConfigField("String", "VERSION_NAME", "\"${versionName}\"")
}
packaging {
resources {
Expand All @@ -90,30 +110,17 @@ android {
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
isMinifyEnabled = true
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_20
targetCompatibility = JavaVersion.VERSION_20
}
buildFeatures {
buildConfig = true
}
dependencies {
debugImplementation(libs.compose.ui.tooling)
}
}

compose.desktop {
application {
mainClass = "MainKt"

nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "com.delacrixmorgan.twilight"
packageVersion = "1.0.0"
}
}
}

compose.experimental {
web.application {}
}
Loading

0 comments on commit 340804c

Please sign in to comment.