Skip to content

Commit

Permalink
Merge pull request #53 from AlexGladkov/rc/release-1.0.0
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
AlexGladkov authored Oct 14, 2022
2 parents 996a7b9 + 3d018ac commit 94ebbe8
Show file tree
Hide file tree
Showing 53 changed files with 660 additions and 531 deletions.
7 changes: 3 additions & 4 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ plugins {
}

android {
compileSdkVersion(31)
compileSdkVersion(Dependencies.compileSdk)

defaultConfig {
minSdkVersion(21)
targetSdkVersion(31)
targetSdkVersion(Dependencies.targetSdk)
versionCode = 1
versionName = "1.0"

Expand All @@ -28,10 +28,9 @@ android {
}

dependencies {
implementation(project(":common:common-root"))
implementation(project(":common:common-sample"))
implementation(project(":odyssey:odyssey-compose"))
implementation(project(":odyssey:odyssey-core"))
implementation(project(":common:common-compose"))
implementation(compose.material)

implementation(Dependencies.AndroidX.AppCompat.appCompat)
Expand Down
22 changes: 3 additions & 19 deletions android/src/main/java/ru/alexgladkov/odyssey_demo/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package ru.alexgladkov.odyssey_demo

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import ru.alexgladkov.common.compose.NavigationTree
import ru.alexgladkov.common.compose.navigation.customNavScreen
import ru.alexgladkov.common.compose.navigation.mainScreen
import ru.alexgladkov.common.compose.navigation.navigationGraph
import ru.alexgladkov.common.compose.navigation.topNavScreen
import ru.alexgladkov.common.compose.screens.ActionsScreen
import ru.alexgladkov.common.compose.screens.PresentedActionsScreen
Expand All @@ -16,24 +18,6 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

setupThemedNavigation("actions") {
screen("actions") {
ActionsScreen(count = 0)
}

screen("push") {
ActionsScreen(count = it as? Int)
}

flow("present") {
screen("present_screen") {
PresentedActionsScreen(count = (it as? Int) ?: 0)
}
}

mainScreen()
topNavScreen()
customNavScreen()
}
setupThemedNavigation(NavigationTree.Actions.name) { navigationGraph() }
}
}
13 changes: 7 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ plugins {
`kotlin-dsl`
}

val compileSdkVersion by extra(31)
val targetSdkVersion by extra(30)
val minSdkVersion by extra(21)

allprojects {
repositories {
google()
Expand All @@ -19,8 +15,13 @@ allprojects {
}

buildscript {
val kotlin_version by extra("1.5.31")
repositories {
mavenLocal()
mavenCentral()
google()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")
}
}
25 changes: 8 additions & 17 deletions buildSrc/buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
object Dependencies {

val odyssey = "1.0.0-beta15"
val odyssey = "1.0.0"
val odysseyPackage = "io.github.alexgladkov"

val compileSdk = 33
val targetSdk = 33

object DI {
const val kodein = "org.kodein.di:kodein-di:7.1.0"
}
Expand All @@ -14,7 +17,7 @@ object Dependencies {
object JetBrains {
object Kotlin {
// __KOTLIN_COMPOSE_VERSION__
private const val VERSION = "1.6.10"
private const val VERSION = "1.7.20"
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$VERSION"
const val testCommon = "org.jetbrains.kotlin:kotlin-test-common:$VERSION"
const val testJunit = "org.jetbrains.kotlin:kotlin-test-junit:$VERSION"
Expand All @@ -23,10 +26,10 @@ object Dependencies {

const val dateTime = "org.jetbrains.kotlinx:kotlinx-datetime:0.2.1"

const val serialization = "org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.1"
const val serialization = "org.jetbrains.kotlinx:kotlinx-serialization-core:1.4.0"
const val serializationPlugin = "org.jetbrains.kotlin:kotlin-serialization:1.5.31"

private const val coroutinesVersion = "1.6.0-native-mt"
private const val coroutinesVersion = "1.6.4"
const val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
const val coroutinesAndroid = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
const val coroutinesSwing = "org.jetbrains.kotlinx:kotlinx-coroutines-swing:$coroutinesVersion"
Expand All @@ -36,21 +39,9 @@ object Dependencies {

object Compose {
// __LATEST_COMPOSE_RELEASE_VERSION__
private const val VERSION = "1.1.1"
private const val VERSION = "1.2.0"
const val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION"
}

object Ktor {
private const val ktorVersion = "1.6.2"
const val core = "io.ktor:ktor-client-core:${ktorVersion}"
const val json = "io.ktor:ktor-client-json:${ktorVersion}"
const val iOS = "io.ktor:ktor-client-ios:${ktorVersion}"
const val iOSCore = "io.ktor:ktor-client-core-native:$ktorVersion"
const val serialization = "io.ktor:ktor-client-serialization:${ktorVersion}"
const val logging = "io.ktor:ktor-client-logging:$ktorVersion"
const val android = "io.ktor:ktor-client-android:$ktorVersion"
const val okHttp = "io.ktor:ktor-client-okhttp:$ktorVersion"
}
}

object Android {
Expand Down
38 changes: 37 additions & 1 deletion buildSrc/src/main/kotlin/multiplatform-compose-setup.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,35 @@ plugins {
kotlin {
jvm("desktop")
android()
iosX64("uikitX64") {
binaries {
executable() {
entryPoint = "main"
freeCompilerArgs += listOf(
"-linker-option", "-framework", "-linker-option", "Metal",
"-linker-option", "-framework", "-linker-option", "CoreText",
"-linker-option", "-framework", "-linker-option", "CoreGraphics"
)
}
}
}
iosArm64("uikitArm64") {
binaries {
executable() {
entryPoint = "main"
freeCompilerArgs += listOf(
"-linker-option", "-framework", "-linker-option", "Metal",
"-linker-option", "-framework", "-linker-option", "CoreText",
"-linker-option", "-framework", "-linker-option", "CoreGraphics"
)
// TODO: the current compose binary surprises LLVM, so disable checks for now.
freeCompilerArgs += "-Xdisable-phases=VerifyBitcode"
}
}
}

sourceSets {
named("commonMain") {
val commonMain by getting {
dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
Expand All @@ -31,6 +57,16 @@ kotlin {
implementation(compose.desktop.common)
}
}

val uikitMain by creating {
dependsOn(commonMain)
}
val uikitX64Main by getting {
dependsOn(uikitMain)
}
val uikitArm64Main by getting {
dependsOn(uikitMain)
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
Expand Down
7 changes: 0 additions & 7 deletions buildSrc/src/main/kotlin/multiplatform-setup.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ kotlin {
jvm("desktop")
android()

// val iosTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget = when {
// System.getenv("SDK_NAME")?.startsWith("iphoneos") == true -> ::iosArm64
// else -> ::iosX64
// }
//
// iosTarget("ios") { }

ios()

sourceSets {
Expand Down

This file was deleted.

This file was deleted.

49 changes: 0 additions & 49 deletions common/common-root/build.gradle.kts

This file was deleted.

2 changes: 0 additions & 2 deletions common/common-root/src/androidMain/AndroidManifest.xml

This file was deleted.

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package ru.alexgladkov.common.compose

enum class NavigationTree {
Actions, Push, Present, PresentScreen, Main, Tab, Top, Drawer
}
Loading

0 comments on commit 94ebbe8

Please sign in to comment.