8000 Update dependencies and refactor gradle by hoc081098 · Pull Request #312 · mori-atsushi/koject · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update dependencies and refactor gradle #312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2ee6aa1
gradle wrapper 8.6
hoc081098 Feb 24, 2024
5bda8cb
Update libs.versions.toml
hoc081098 Feb 24, 2024
76f6382
compose-multiplatform = "1.5.12"
hoc081098 Feb 24, 2024
146235d
koject-core: applyDefaultHierarchyTemplate
hoc081098 Feb 24, 2024
e1883a7
android: compile sdk and target sdk to 34
hoc081098 Feb 24, 2024
11430b0
koject-compose-core: applyDefaultHierarchyTemplate and simplify
hoc081098 Feb 24, 2024
43b7e86
androidx-compose-compiler = "1.5.10"
hoc081098 Feb 24, 2024
de03783
bump androidx and others...
hoc081098 Feb 24, 2024
9c815a1
all: target jvm to 11 but use 17 as jvm tool chain
hoc081098 Feb 24, 2024
56b1f3b
processor: target jvm to 11 but use 17 as jvm tool chain
hoc081098 Feb 24, 2024
42963bf
integration-test-compose: applyDefaultHierarchyTemplate and use commo…
hoc081098 Feb 24, 2024
dee6ab1
integration-lib: applyDefaultHierarchyTemplate
hoc081098 Feb 24, 2024
3eb56b2
integration-lib: applyDefaultHierarchyTemplate
hoc081098 Feb 24, 2024
c3620e2
integration: done all
hoc081098 Feb 24, 2024
dff8646
fix ksp config
hoc081098 Feb 24, 2024
cf905b8
fix ksp config: app instead of lib
hoc081098 Feb 24, 2024
92f3c1e
kotlinUpgradeYarnLock
hoc081098 Feb 24, 2024
d2d171b
use -Xexpect-actual-classes flag
hoc081098 Feb 24, 2024
0e662e9
Update build.gradle.kts
hoc081098 Feb 24, 2024
b8706c7
Apply suggestions from code review [skip ci]
hoc081098 Feb 24, 2024
edbbecf
Apply suggestions from code review
hoc081098 Feb 24, 2024
6926ff3
Update build.gradle.kts
hoc081098 Feb 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .idea/codeStyles/Project.xml

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

15 changes: 11 additions & 4 deletions android/koject-android-activity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@ plugins {
alias(libs.plugins.dokka)
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.AZUL)
}
}

android {
namespace = "com.moriatsushi.koject.android.activity"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 14
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "17"
jvmTarget = "11"
}
buildFeatures {
buildConfig = false
Expand Down
15 changes: 11 additions & 4 deletions android/koject-android-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@ plugins {
alias(libs.plugins.dokka)
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.AZUL)
}
}

android {
namespace = "com.moriatsushi.koject.android"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 14
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "17"
jvmTarget = "11"
}
buildFeatures {
buildConfig = false
Expand Down
15 changes: 11 additions & 4 deletions android/koject-android-fragment/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@ plugins {
alias(libs.plugins.dokka)
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.AZUL)
}
}

android {
namespace = "com.moriatsushi.koject.android.fragment"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 14
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "17"
jvmTarget = "11"
}
buildFeatures {
buildConfig = false
Expand Down
15 changes: 11 additions & 4 deletions android/koject-android-viewmodel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@ plugins {
alias(libs.plugins.dokka)
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.AZUL)
}
}

android {
namespace = "com.moriatsushi.koject.android.viewmodel"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 14
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "17"
jvmTarget = "11"
}
buildFeatures {
buildConfig = false
Expand Down
118 changes: 55 additions & 63 deletions compose/koject-compose-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.util.Locale

plugins {
kotlin("multiplatform")
alias(libs.plugins.android.library)
Expand All @@ -8,112 +11,101 @@ plugins {
}

kotlin {
android()
jvm("desktop")
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.AZUL)
}

androidTarget {
compilations.configureEach {
compilerOptions.configure {
jvmTarget = JvmTarget.JVM_11
}
}
}
jvm("desktop") {
compilations.configureEach {
compilerOptions.configure {
jvmTarget = JvmTarget.JVM_11
}
}
}
js(IR) {
browser()
}
ios()

iosArm64()
iosX64()
iosSimulatorArm64()
macosX64()
macosArm64()
watchos()
tvos()
tvosX64()
tvosSimulatorArm64()
tvosArm64()
watchosArm32()
watchosArm64()
watchosX64()
watchosSimulatorArm64()

mingwX64()
linuxX64()

applyDefaultHierarchyTemplate()

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(project(":koject-core"))
implementation(compose.runtime)
implementation(libs.kotlinx.coroutines.core)
}
}

val commonTest by getting {
commonTest {
dependencies {
implementation(kotlin("test"))
}
}

val androidMain by getting {
dependsOn(commonMain)
androidMain {
dependencies {
implementation(compose.ui)
}
}

val nativeMain by creating {
dependsOn(commonMain)
}

val iosMain by getting {
dependsOn(nativeMain)
}

val iosSimulatorArm64Main by getting {
dependsOn(iosMain)
}

val macosX64Main by getting {
dependsOn(nativeMain)
}

val macosArm64Main by getting {
dependsOn(nativeMain)
}

val watchosMain by getting {
dependsOn(nativeMain)
}

val tvosMain by getting {
dependsOn(nativeMain)
}

val mingwX64Main by getting {
dependsOn(nativeMain)
}

val linuxX64Main by getting {
dependsOn(nativeMain)
}
}
}

android {
namespace = "com.moriatsushi.koject.compose"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 21
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
buildFeatures {
buildConfig = false
}
}



dependencies {
add("kspAndroid", project(":processor:lib"))
add("kspDesktop", project(":processor:lib"))
add("kspJs", project(":processor:lib"))
add("kspIosX64", project(":processor:lib"))
add("kspIosArm64", project(":processor:lib"))
add("kspIosSimulatorArm64", project(":processor:lib"))
add("kspMacosX64", project(":processor:lib"))
add("kspMacosArm64", project(":processor:lib"))
add("kspWatchosArm32", project(":processor:lib"))
add("kspWatchosArm64", project(":processor:lib"))
add("kspWatchosX64", project(":processor:lib"))
add("kspTvosArm64", project(":processor:lib"))
add("kspTvosX64", project(":processor:lib"))
add("kspMingwX64", project(":processor:lib"))
add("kspLinuxX64", project(":processor:lib"))
fun String.capitalizeUS() = replaceFirstChar {
if (it.isLowerCase()) it.titlecase(Locale.US)
else it.toString()
}

kotlin
.targets
.names
.map { it.capitalizeUS() }
.forEach { target ->
val targetConfigSuffix = if (target == "Metadata") "CommonMainMetadata" else target
add("ksp${targetConfigSuffix}", project(":processor:lib"))
}
}

ksp {
Expand Down
15 changes: 11 additions & 4 deletions compose/koject-compose-viewmodel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,25 @@ plugins {
alias(libs.plugins.dokka)
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.AZUL)
}
}

android {
namespace = "com.moriatsushi.koject.compose.viewmodel"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 21
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "17"
jvmTarget = "11"
}
buildFeatures {
buildConfig = false
Expand Down
4 changes: 2 additions & 2 deletions examples/kmm/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ plugins {

android {
namespace = "com.moriatsushi.koject.example.kmm"
compileSdk = 33
compileSdk = 34
defaultConfig {
applicationId = "com.moriatsushi.koject.example.kmm"
minSdk = 23
targetSdk = 33
targetSdk = 34
versionCode = 1
versionName = "1.0"

Expand Down
2 changes: 1 addition & 1 deletion examples/kmm/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ kotlin {

android {
namespace = "com.moriatsushi.koject.example.kmm.data"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 23
}
Expand Down
2 changes: 1 addition & 1 deletion examples/kmm/infrastructure/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ kotlin {

android {
namespace = "com.moriatsushi.koject.example.kmm.infrastructure"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 23
}
Expand Down
2 changes: 1 addition & 1 deletion examples/kmm/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ kotlin {

android {
namespace = "com.moriatsushi.koject.example.kmm"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 23
}
Expand Down
2 changes: 1 addition & 1 deletion examples/kmm/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ kotlin {

android {
namespace = "com.moriatsushi.koject.example.kmm.ui"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 23
}
Expand Down
Loading
0