Skip to content
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

Updated kiteui to use versions catalog. #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
89 changes: 54 additions & 35 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,59 @@
group = "com.lightningkite.kiteui"
version = "1.0-SNAPSHOT"

buildscript {
val kotlinVersion:String by extra
repositories {
// mavenLocal()
// maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven(url = "https://s01.oss.sonatype.org/content/repositories/releases/")
google()
mavenCentral()
maven("https://jitpack.io")
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.9.10")
classpath("com.lightningkite:deploy-helpers:0.0.7")
classpath("com.android.tools.build:gradle:7.4.2")
}
plugins {
alias(libs.plugins.dokka) apply false
alias(libs.plugins.kotlinJvm) apply false
alias(libs.plugins.kotlinAndroid) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.kotlinSerialization) apply false
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
alias(libs.plugins.kiteUI) apply false
alias(libs.plugins.kotlinCocoapods) apply false
// alias(libs.plugins.lkDeployHelpers)
}
allprojects {
group = "com.lightningkite.kiteui"
repositories {
mavenLocal()
maven("https://jitpack.io")
// maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven(url = "https://s01.oss.sonatype.org/content/repositories/releases/")
google()
mavenCentral()
}

buildscript {
dependencies { classpath(libs.lkDeployHelpers) }
}
repositories {
mavenLocal()
maven("https://jitpack.io")
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven(url = "https://s01.oss.sonatype.org/content/repositories/releases/")
google()
mavenCentral()
}

//kotlin("plugin.serialization") version kotlinVersion
//id("com.google.devtools.ksp") version kspVersion
//id("com.lightningkite.kiteui") version "main-SNAPSHOT"

//buildscript {
// val kotlinVersion:String by extra
// repositories {
// mavenLocal()
// google()
// mavenCentral()
// maven("https://jitpack.io")
// }
// dependencies {
// classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
// classpath("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion")
// classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.9.10")
// classpath("com.lightningkite:deploy-helpers:0.0.7")
// classpath("com.android.tools.build:gradle:7.4.2")
// }
//}
//allprojects {
// group = "com.lightningkite.kiteui"
// repositories {
// mavenLocal()
//// maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
// maven(url = "https://s01.oss.sonatype.org/content/repositories/releases/")
// google()
// mavenCentral()
// }
//}
//repositories {
// mavenLocal()
// maven("https://jitpack.io")
// maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
// maven(url = "https://s01.oss.sonatype.org/content/repositories/releases/")
// google()
// mavenCentral()
//}
1 change: 0 additions & 1 deletion buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

rootProject.name = "buildSrc"
12 changes: 6 additions & 6 deletions example-app-android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlinAndroid)
}

android {
Expand Down Expand Up @@ -30,10 +30,10 @@ android {
val okHttpVersion: String = "4.11.0"

dependencies {
implementation("androidx.appcompat:appcompat:1.6.1")
implementation(libs.appCompat)
implementation(project(":library"))
api(project(":example-app"))
testImplementation("junit:junit:4.13.2")
implementation(platform("com.squareup.okhttp3:okhttp-bom:$okHttpVersion"))
implementation("com.squareup.okhttp3:okhttp")
testImplementation(libs.kotlinTest)
implementation(project.dependencies.platform(libs.okhttpBom))
implementation(libs.okhttp)
}
35 changes: 19 additions & 16 deletions example-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,32 @@ import com.lightningkite.kiteui.KiteUiPluginExtension
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode
import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
import java.util.*

plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("com.google.devtools.ksp")
kotlin("native.cocoapods")
id("com.android.library")
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.ksp)
alias(libs.plugins.kotlinCocoapods)
alias(libs.plugins.androidLibrary)
}

apply<KiteUiPlugin>()

group = "com.lightningkite"
version = "1.0-SNAPSHOT"

repositories {
mavenCentral()
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
kotlin {
applyDefaultHierarchyTemplate()

jvm()
androidTarget()
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "17"
}
}
}
iosX64()
iosArm64()
iosSimulatorArm64()
Expand Down Expand Up @@ -144,17 +145,19 @@ android {
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
compileSdk = 31

defaultConfig {
minSdk = 26
}
compileOptions {
// Flag to enable support for the new language APIs
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
coreLibraryDesugaring(libs.jdkDesugar)
}

defaultConfig {
minSdk = 26
}
}

Expand Down
17 changes: 2 additions & 15 deletions gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,7 @@ plugins {
`kotlin-dsl`
signing
`maven-publish`
id("org.jetbrains.dokka")
}

buildscript {
repositories {
mavenLocal()
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven(url = "https://s01.oss.sonatype.org/content/repositories/releases/")
google()
mavenCentral()
}
dependencies {
classpath("com.lightningkite:deploy-helpers:master-SNAPSHOT")
}
alias(libs.plugins.dokka)
}

gradlePlugin {
Expand All @@ -37,7 +24,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation("org.apache.pdfbox:fontbox:2.0.27")
implementation(libs.fontBox)
}
tasks.validatePlugins {
enableStricterValidation.set(true)
Expand Down
84 changes: 84 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[versions]
kotlin = "1.9.23"
ksp = "1.9.23-1.0.19"
agp = "8.2.0"
lightningserver = "version-2-SNAPSHOT"
kiteUI = "main-SNAPSHOT"
jdkDesugar = "2.0.4"
dokka = "1.9.20"
kotlinx-coroutines = "1.8.1"
lkDeployHelpers = "0.0.7"
androidxCardView = "1.0.0"
androidxTransition = "1.4.1"
androidxMedia3 = "1.2.1"
appCompat = "1.6.1"
recyclerView = "1.3.2"
material = "1.11.0"
ktor = "2.3.7"
timber = "5.0.1"
glide = "5.0.0-rc01"
touchImageView = "3.6"
kotlinxSerializationLibs = "1.6.3"
kotlinxDateTime = "0.5.0"
apacheCommonsLang = "3.12.0"
fontBox = "2.0.27"
okhttp = "4.11.0"

[libraries]
kotlinTest = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlinTestJunit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
lkServerCore = { module = "com.lightningkite.lightningserver:server-core", version.ref = "lightningserver" }
lkServerClient = { module = "com.lightningkite.lightningserver:client", version.ref = "lightningserver" }
lkServerMongo = { module = "com.lightningkite.lightningserver:server-mongo", version.ref = "lightningserver" }
lkServerSentry = { module = "com.lightningkite.lightningserver:server-sentry", version.ref = "lightningserver" }
lkServerShared = { module = "com.lightningkite.lightningserver:shared", version.ref = "lightningserver"}
coroutinesCore = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kotlinCompiler = { module = "org.jetbrains.kotlin:kotlin-compiler", version.ref = "kotlin" }
kotlinStdLib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kspSymbolProcessing = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref="ksp"}
fontBox = { module = "org.apache.odfbox:fontbox", version.ref = "fontBox" }
okhttpBom = { module = "com.squareup.okhttp3:okhttp-bom", version.ref = "okhttp" }
okhttp = { module = "com.squareup.okhttp3:okhttp" }

apacheCommonsLang = { module = "org.apache.commons:commons-lang", version.ref = "apacheCommonsLang" }

appCompat = { module = "androidx.appcompat:appcompat", version.ref = "appCompat" }
recyclerView = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerView" }
material = { module = "com.google.android.material:material", version.ref = "material" }

kotlinxJson = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationLibs"}
kotlinxProperties = { module = "org.jetbrains.kotlinx:kotlinx-serialization-properties", version.ref = "kotlinxSerializationLibs"}
kotlinxDateTime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDateTime"}

transition = { module = "androidx.transition:transition", version.ref = "androidxTransition"}
cardView = { module = "androidx.cardview:cardview", version.ref = "androidxCardView" }
timber = { module = "com.jakewharton.timber:timber", version.ref = "timber"}
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
touchImageView = { module = "com.github.MikeOrtiz:TouchImageView", version.ref = "touchImageView" }
ktorClientCore = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktorClientCio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
ktorClientWebsockets = { module = "io.ktor:ktor-client-websockets", version.ref = "ktor" }
ktorClientDarwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor"}
androidxMedia3Common = { module = "androidx.media3:media3-common", version.ref = "androidxMedia3" }
androidxMedia3ExoPLayer = { module = "androidx.media3:media3-exoplayer", version.ref = "androidxMedia3" }
androidxMedia3UI = { module = "androidx.media3:media3-ui", version.ref = "androidxMedia3" }

lkServerKtor = { module = "com.lightningkite.lightningserver:server-ktor", version.ref = "lightningserver" }
lkServerProcessor = { module = "com.lightningkite.lightningserver:processor", version.ref = "lightningserver" }
kiteUI = { module = "com.lightningkite.kiteui:library", version.ref = "kiteUI" }
kiteUIProcessor = { module = "com.lightningkite.kiteui:processor", version.ref = "kiteUI" }
jdkDesugar = { module = "com.android.tools:desugar_jdk_libs", version.ref = "jdkDesugar" }
lkDeployHelpers = { module = "com.lightningkite:deploy-helpers", version.ref = "lkDeployHelpers" }

[plugins]
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
androidApplication = { id = "com.android.application", version.ref = "agp"}
androidLibrary = { id = "com.android.library", version.ref = "agp" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kiteUI = { id = "com.lightningkite.kiteui", version.ref = "kiteUI"}
kotlinCocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
#lkDeployHelpers = { id = "com.lightningkite.deploy-helpers", version.ref = "lkDeployHelpers" }
Loading
Loading