Skip to content

Commit

Permalink
Merged
Browse files Browse the repository at this point in the history
  • Loading branch information
kpgalligan committed Oct 29, 2023
2 parents 9d0f47d + dbabed1 commit b91b549
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 31 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ktlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2

uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: "17"
- name: run ktlint
run: ./gradlew ktlintCheck
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This project has a pair of native mobile applications backed by the Sessionize d

> ## Subscribe!
>
> We build solutions that get teams started smoothly with Kotlin Multiplatform Mobile and ensure their success in production. Join our community to learn how your peers are adopting KMM.
> We build solutions that get teams started smoothly with Kotlin Multiplatform and ensure their success in production. Join our community to learn how your peers are adopting KMM.
[Sign up here](https://form.typeform.com/to/MJTpmm?typeform-source=touchlab.co)!

## Building
Expand Down
10 changes: 8 additions & 2 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ android {
val androidCompileSdk = libs.versions.compileSdk.get()
val androidTargetSdk = libs.versions.targetSdk.get()

namespace = "co.touchlab.droidcon"
compileSdk = androidCompileSdk.toInt()
namespace = "co.touchlab.droidcon.android"

defaultConfig {
applicationId = "co.touchlab.droidcon.london"
minSdk = androidMinSdk.toInt()
targetSdk = androidTargetSdk.toInt()
versionCode = 20200
versionCode = 20201
versionName = "2.2.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -79,6 +80,10 @@ android {
}
}

kotlin {
jvmToolchain(libs.versions.java.get().toInt())
}

dependencies {
implementation(project(":shared"))
implementation(project(":shared-ui"))
Expand All @@ -89,6 +94,7 @@ dependencies {
implementation(libs.kotlinx.datetime)
implementation(libs.accompanist.coil)
implementation(libs.accompanist.navigationAnimation)
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.analytics)
implementation(libs.firebase.crashlytics)

Expand Down
7 changes: 5 additions & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.touchlab.droidcon">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />

<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand All @@ -30,5 +31,7 @@
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>

<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
</application>
</manifest>
4 changes: 2 additions & 2 deletions android/src/main/java/co/touchlab/droidcon/android/MainApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import co.touchlab.droidcon.ui.uiModule
import co.touchlab.droidcon.util.ClasspathResourceReader
import com.google.firebase.analytics.ktx.analytics
import com.google.firebase.ktx.Firebase
import com.russhwolf.settings.AndroidSettings
import com.russhwolf.settings.ExperimentalSettingsApi
import com.russhwolf.settings.ObservableSettings
import com.russhwolf.settings.SharedPreferencesSettings
import org.koin.dsl.module

@OptIn(ExperimentalSettingsApi::class)
Expand All @@ -33,7 +33,7 @@ class MainApp : Application() {
single<SharedPreferences> {
get<Context>().getSharedPreferences("DROIDCON_SETTINGS_2023", Context.MODE_PRIVATE)
}
single<ObservableSettings> { AndroidSettings(delegate = get()) }
single<ObservableSettings> { SharedPreferencesSettings(delegate = get()) }

single<ParseUrlViewService> {
DefaultParseUrlViewService()
Expand Down
11 changes: 10 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.google.firebase.crashlytics") version libs.versions.firebase.crashlytics.gradle.get() apply false
Expand All @@ -19,8 +21,9 @@ allprojects {
repositories {
google()
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://androidx.dev/storage/compose-compiler/repository/")
}
}

Expand All @@ -41,6 +44,12 @@ subprojects {
dependsOn(tasks.getByName("ktlintCheck"))
}
}

tasks.withType(KotlinCompile::class).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}

tasks.register<Delete>("clean") {
Expand Down
12 changes: 7 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@ kotlinx-datetime = "0.4.1"
ktor = "2.3.4"

stately = "2.0.5"
java = "17"
kermit = "2.0.1"
skie = "0.5.1-preview.1.9.20-RC2"

hyperdrive = "0.1.148"

multiplatformSettings = "1.0.0"
sqlDelight = "2.0.0"
firebase-bom = "32.3.1"
firebase-analytics = "21.4.0"
firebase-crashlytics = "18.5.1"
firebase-crashlytics-gradle = "2.9.9"
gms-google-services = "4.4.0"

compose-main = "1.5.4"
compose-compiler = "1.5.3"
composeActivity = "1.6.1"
compose-compiler = "1.5.4-dev-k1.9.20-RC2-93f1625925e"
composeNavigation = "2.7.4"
compose-jb = "1.5.10-rc02"

Expand Down Expand Up @@ -58,8 +59,9 @@ androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", versi

accompanist-coil = { module = "com.google.accompanist:accompanist-coil", version.ref = "accompanistCoil" }
accompanist-navigationAnimation = { module = "com.google.accompanist:accompanist-navigation-animation", version.ref = "accompanistNavigationAnimation" }
firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx", version.ref = "firebase-analytics" }
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx", version.ref = "firebase-crashlytics" }
firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase-bom" }
firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx", version = "_" }
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx", version = "_" }
hyperdrive-multiplatformx-api = { module = "org.brightify.hyperdrive:multiplatformx-api", version.ref = "hyperdrive" }
android-desugar = { module = "com.android.tools:desugar_jdk_libs", version.ref = "android-desugaring" }
uuid = { module = "com.benasher44:uuid", version.ref = "uuid" }
Expand Down Expand Up @@ -122,7 +124,7 @@ androidx-compose-ui-core = { module = "androidx.compose.ui:ui", version.ref = "c
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose-main" }
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose-main" }
androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "compose-main" }
androidx-compose-activity = { module = "androidx.compose.activity:activity-compose", version.ref = "composeActivity" }
androidx-compose-activity = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
androidx-compose-navigation = { module = "androidx.navigation:navigation-compose", version.ref = "composeNavigation" }

[bundles]
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3 changes: 1 addition & 2 deletions ios/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ kotlin {
isStatic = true
embedBitcode = BitcodeEmbeddingMode.DISABLE

export(libs.kermit.simple)

freeCompilerArgs += listOf(
"-linker-option", "-framework", "-linker-option", "Metal",
"-linker-option", "-framework", "-linker-option", "CoreText",
Expand All @@ -71,6 +69,7 @@ kotlin {
binaries.withType<Framework> {
linkerOpts.add("-lsqlite3")
export(libs.kermit)
export(libs.kermit.simple)
export(libs.hyperdrive.multiplatformx.api)
export(project(":shared"))
export(project(":shared-ui"))
Expand Down
5 changes: 2 additions & 3 deletions shared-ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ android {
val androidCompileSdk = libs.versions.compileSdk.get()
val androidTargetSdk = libs.versions.targetSdk.get()

namespace = "co.touchlab.droidcon.sharedui"
compileSdk = androidCompileSdk.toInt()
namespace = "co.touchlab.droidcon.shared-ui"
namespace = "co.touchlab.droidcon.shared.ui"
defaultConfig {
minSdk = androidMinSdk.toInt()
targetSdk = androidTargetSdk.toInt()
Expand Down Expand Up @@ -74,8 +75,6 @@ kotlin {
api(libs.kotlinx.coroutines.core)
api(libs.kotlinx.datetime)
api(libs.multiplatformSettings.core)
// this enforces new version of atomicfu, the older version from other libraries crashes iOS build
api(libs.atomicFu)
api(libs.uuid)

implementation(libs.bundles.ktor.common)
Expand Down
5 changes: 1 addition & 4 deletions shared-ui/src/androidMain/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.touchlab.droidcon.sharedui">

</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"/>
1 change: 1 addition & 0 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ android {
val androidCompileSdk = libs.versions.compileSdk.get()
val androidTargetSdk = libs.versions.targetSdk.get()

namespace = "co.touchlab.droidcon.shared"
compileSdk = androidCompileSdk.toInt()
namespace = "co.touchlab.droidcon.shared"
defaultConfig {
Expand Down
5 changes: 1 addition & 4 deletions shared/src/androidMain/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.touchlab.droidcon.shared">

</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"/>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package co.touchlab.droidcon.domain.repository.impl

import android.content.Context
import co.touchlab.droidcon.db.DroidconDatabase
import app.cash.sqldelight.android.AndroidSqliteDriver
import app.cash.sqldelight.driver.android.AndroidSqliteDriver
import app.cash.sqldelight.db.SqlDriver

actual class SqlDelightDriverFactory(
Expand Down

0 comments on commit b91b549

Please sign in to comment.