Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed Sep 19, 2021
2 parents 120e6d0 + 185613a commit 1d30830
Show file tree
Hide file tree
Showing 37 changed files with 26 additions and 486 deletions.
5 changes: 2 additions & 3 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="AllowBackup"
tools:targetApi="m">

<activity
android:name="com.github.mustafaozhan.ccc.android.ui.splash.SplashActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Fullscreen.SplashTheme"
tools:ignore="AllowBackup">
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
Expand Down
13 changes: 0 additions & 13 deletions android/src/main/res/drawable/ic_info.xml

This file was deleted.

6 changes: 0 additions & 6 deletions android/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,12 @@

<!-- Base Mob Colors -->

<!-- Toast -->
<color name="color_background_toast">@color/color_text</color>
<color name="color_text_toast">@color/color_background_weak</color>
<color name="color_icon_toast">@color/color_background_weak</color>

<!-- Dialog -->
<color name="color_text_title_dialog">@color/color_accent</color>
<color name="color_text_message_dialog">@color/color_text</color>
<color name="color_background_dialog">@color/color_background</color>
<color name="color_text_positive_button_dialog">@color/color_primary</color>
<color name="color_text_neutral_button_dialog">@color/color_primary</color>
<color name="color_text_negative_button_dialog">@color/color_primary</color>

<!-- Snack Bar -->
<color name="color_text_action_snack_bar">@color/color_accent</color>
Expand Down
1 change: 0 additions & 1 deletion android/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<!--Margin Sizes-->
<dimen name="margin_zero">0dp</dimen>
<dimen name="margin_two">2dp</dimen>
<dimen name="margin_three">3dp</dimen>
<dimen name="margin_four">4dp</dimen>
<dimen name="margin_eight">8dp</dimen>
<dimen name="margin_twelve">12dp</dimen>
Expand Down
2 changes: 1 addition & 1 deletion basemob
1 change: 0 additions & 1 deletion billing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ android {
dependencies {
with(Dependencies.Android) {
api(BILLING)
implementation(KOIN_ANDROID)
implementation(LIFECYCLE_RUNTIME)
}

Expand Down
6 changes: 0 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ buildscript {
gradlePluginPortal()
google()
maven("https://dl.bintray.com/icerockdev/plugins")
// todo enable when implementation start
// maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
with(ClassPaths) {
Expand All @@ -27,8 +25,6 @@ buildscript {
classpath(SQL_DELIGHT)
classpath(MOKO_RESOURCES)
classpath(BUILD_KONFIG)
// todo enable when implementation start
// classpath(compose)
}
}
}
Expand All @@ -42,8 +38,6 @@ allprojects {
google()
maven("https://dl.bintray.com/ekito/koin")
maven("https://dl.bintray.com/icerockdev/moko")
maven("https://kotlin.bintray.com/kotlin-js-wrappers")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://kotlin.bintray.com/kotlinx/")
}
}
Expand Down
1 change: 0 additions & 1 deletion buildSrc/src/main/kotlin/ClassPaths.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ object ClassPaths {
"com.android.tools.build:gradle:${Versions.ANDROID_GRADLE_PLUGIN}"
const val KOTLIN_GRADLE_PLUGIN = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.KOTLIN}"
const val KOTLIN_SERIALIZATION = "org.jetbrains.kotlin:kotlin-serialization:${Versions.KOTLIN}"
const val COMPOSE = "org.jetbrains.compose:compose-gradle-plugin:${Versions.COMPOSE}"
const val SQL_DELIGHT = "com.squareup.sqldelight:gradle-plugin:${Versions.SQL_DELIGHT}"
const val GSM = "com.google.gms:google-services:${Versions.GSM}"
const val CRASHLYTICS =
Expand Down
4 changes: 0 additions & 4 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,5 @@ object Dependencies {

object JS {
const val TEST = "test-js"
const val KOTLIN_X_HTML = "org.jetbrains.kotlinx:kotlinx-html-js:${Versions.KOTLIN_X_HTML}"
const val KOTLIN_REACT = "org.jetbrains:kotlin-react:${Versions.KOTLIN_REACT}"
const val KOTLIN_REACT_DOM = "org.jetbrains:kotlin-react-dom:${Versions.KOTLIN_REACT}"
const val KTOR = "io.ktor:ktor-client-js:${Versions.KTOR}"
}
}
1 change: 0 additions & 1 deletion buildSrc/src/main/kotlin/Plugins.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
object Plugins {
const val MULTIPLATFORM = "multiplatform"
const val ANDROID = "android"
const val COMPOSE = "org.jetbrains.compose"
const val JS = "js"
const val ANDROID_APP = "com.android.application"
const val ANDROID_LIB = "com.android.library"
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/ProjectSettings.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* Copyright (c) 2021 Mustafa Ozhan. All rights reserved.
*/
import org.gradle.api.Project
import java.io.ByteArrayOutputStream
import org.gradle.api.Project

object ProjectSettings {

Expand All @@ -14,9 +14,9 @@ object ProjectSettings {

const val PROJECT_ID = "mustafaozhan.github.com.mycurrencies"
const val PACKAGE_NAME = "com.github.mustafaozhan.ccc"
const val COMPILE_SDK_VERSION = 30
const val COMPILE_SDK_VERSION = 31
const val MIN_SDK_VERSION = 21
const val TARGET_SDK_VERSION = 30
const val TARGET_SDK_VERSION = 31

fun getVersionCode(project: Project) = gitCommitCount(project).toInt()

Expand Down
9 changes: 3 additions & 6 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
@Suppress("SpellCheckingInspection")
object Versions {
const val KOTLIN = "1.5.30"
const val ANDROID_GRADLE_PLUGIN = "7.1.0-alpha11"
const val COMPOSE = "0.4.0"
const val ANDROID_GRADLE_PLUGIN = "7.1.0-alpha12"
const val ANDROID_MATERIAL = "1.4.0"
const val CONSTRAINT_LAYOUT = "2.1.0"
const val KTOR = "1.6.3"
const val LOG_BACK = "1.3.0-alpha10"
const val KOTLIN_X_HTML = "0.7.2"
const val KOTLIN_REACT = "17.0.1-pre.148-kotlin-1.4.30"
const val KOIN = "3.1.2"
const val KERMIT = "0.1.9"
const val MULTIPLATFORM_SETTINGS = "0.8"
Expand All @@ -30,9 +27,9 @@ object Versions {
const val BILLING = "4.0.0"
const val LEAK_CANARY = "2.7"
const val SQL_DELIGHT = "1.5.1"
const val LIFECYCLE = "2.4.0-alpha03"
const val LIFECYCLE = "2.4.0-beta01"
const val MOKO_RESOURCES = "0.17.2"
const val DEPENDENCY_UPDATES = "0.39.0"
const val BUILD_HEALTH = "0.77.0"
const val BUILD_HEALTH = "0.78.0"
const val BUILD_KONFIG = "0.9.0"
}
20 changes: 5 additions & 15 deletions client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,22 @@ kotlin {
iosX64("ios")
}

// todo enable when implementation start
// jvm()

// todo enable when implementation start
// js { browser { binaries.executable()testTask { enabled = false } } }

cocoapods {
summary = "CCC"
homepage = "https://github.com/CurrencyConverterCalculator/CCC"
frameworkName = "Client"
ios.deploymentTarget = "14.0"
framework {
baseName = "Client"
}
}

@Suppress("UNUSED_VARIABLE")
sourceSets {

all {
languageSettings.apply {
useExperimentalAnnotation("kotlinx.coroutines.FlowPreview")
useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi")
optIn("kotlinx.coroutines.FlowPreview")
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
}
}

Expand Down Expand Up @@ -102,12 +98,6 @@ kotlin {
}
}
val iosTest by getting

// todo enable when implementation start
// with(Dependencies.JVM) { val jvmMain by getting val jvmTest by getting { dependencies { implementation(kotlin(testJUnit)) } } }

// todo enable when implementation start
// with(Dependencies.JS) { val jsMain by getting val jsTest by getting { dependencies { implementation(kotlin(test)) } } }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,18 @@ import com.github.mustafaozhan.ccc.client.util.toSupportedCharacters
import com.github.mustafaozhan.ccc.client.util.toValidList
import com.github.mustafaozhan.ccc.common.model.CurrencyResponse
import com.github.mustafaozhan.ccc.common.model.CurrencyType
import com.github.mustafaozhan.ccc.common.model.PlatformType
import com.github.mustafaozhan.ccc.common.model.Rates
import com.github.mustafaozhan.ccc.common.platform
import com.github.mustafaozhan.ccc.common.util.DAY
import com.github.mustafaozhan.ccc.common.util.WEEK
import com.github.mustafaozhan.ccc.common.util.nowAsInstant
import com.github.mustafaozhan.ccc.common.util.nowAsLong
import kotlinx.datetime.Instant
import kotlinx.datetime.TimeZone
import kotlinx.datetime.minus
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertTrue
import kotlinx.datetime.Instant
import kotlinx.datetime.TimeZone
import kotlinx.datetime.minus

@Suppress("TooManyFunctions")
class ExtensionsTest {
Expand Down Expand Up @@ -85,11 +83,7 @@ class ExtensionsTest {
@Test
fun getFormatted() {
val actualDouble = 123456.7890
if (platform == PlatformType.JS) {
assertEquals(actualDouble.toString(), actualDouble.getFormatted())
} else {
assertEquals("123 456.789", actualDouble.getFormatted())
}
assertEquals("123 456.789", actualDouble.getFormatted())
}

@Test
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1d30830

Please sign in to comment.