Skip to content

Commit

Permalink
Migrate plugins to version catalog (#2938)
Browse files Browse the repository at this point in the history
* Migrate from groovy to kotlin dsl

* Migrate a few plugins to version catalog

* Migrate a few plugins to version catalog

* Fix CI

* Fix spotless

* Fix spotless

* Fix spotless

* Fix spotless
  • Loading branch information
Raynafs authored Jan 8, 2024
1 parent 92e2569 commit 74b7180
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 15 deletions.
26 changes: 11 additions & 15 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,27 @@ import com.diffplug.gradle.spotless.SpotlessExtension
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration


// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
maven(url = "https://plugins.gradle.org/m2/")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
}

dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10")
classpath("org.jetbrains.kotlin:kotlin-serialization:1.8.10")
classpath("com.google.dagger:hilt-android-gradle-plugin:2.45")
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3")
classpath("com.diffplug.spotless:spotless-plugin-gradle:6.19.0")
classpath("gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.0")
classpath("de.mannodermaus.gradle.plugins:android-junit5:1.8.2.1")
classpath("com.android.tools.build:gradle:7.1.3")
classpath("org.jetbrains.dokka:dokka-base:1.8.20")
classpath("org.owasp:dependency-check-gradle:8.2.1")
}
}

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id("org.jetbrains.dokka") version "1.8.20"
id("org.owasp.dependencycheck") version "8.2.1"
id("com.github.kt3k.coveralls") version "2.12.0"
id("org.jetbrains.kotlin.jvm") version "1.8.10"
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.dagger.hilt.android) apply false
alias(libs.plugins.androidx.navigation.safeargs) apply false
alias(libs.plugins.org.jetbrains.dokka)
alias(libs.plugins.org.owasp.dependencycheck)
alias(libs.plugins.com.diffplug.spotless)

}

tasks.dokkaHtmlMultiModule {
Expand Down
16 changes: 16 additions & 0 deletions android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ work-testing = "2.8.1"
workflow = "0.1.0-alpha02-preview9.1-SNAPSHOT"
xercesImpl = "2.12.2"
org-jetbrains-kotlin-android = "1.8.10"
jetbrains = "1.8.20"
owasp = "8.2.1"
kt3k-coveralls = "2.12.0"
kotlin-jvm = "1.8.10"
kotlin-serialization = "1.8.10"
dagger-hilt = "2.45"
jetbrains-dokka = "1.8.20"
navigation-safeargs = "2.4.2"
diffplug-spotless = "6.19.0"


[libraries]
accompanist-flowlayout = { group = "com.google.accompanist", name = "accompanist-flowlayout", version.ref = "accompanist-flowlayout" }
Expand Down Expand Up @@ -215,3 +225,9 @@ xercesImpl = { group = "xerces", name = "xercesImpl", version.ref = "xercesImpl"

[plugins]
org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "org-jetbrains-kotlin-android" }
org-jetbrains-dokka = { id = "org.jetbrains.dokka", version.ref = "jetbrains" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin-serialization" }
org-owasp-dependencycheck = { id = "org.owasp.dependencycheck", version.ref = "owasp" }
dagger-hilt-android= { id = "com.google.dagger.hilt.android", version.ref = "dagger-hilt" }
com-diffplug-spotless = { id = "com.diffplug.spotless", version.ref = "diffplug-spotless" }
androidx-navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin", version.ref = "navigation-safeargs" }
7 changes: 7 additions & 0 deletions android/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
pluginManagement {
repositories {
google()
maven(url = "https://plugins.gradle.org/m2/")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
}
}
rootProject.name = "fhircore-android"
include (":engine")
include (":quest")
Expand Down

0 comments on commit 74b7180

Please sign in to comment.