Skip to content

Commit

Permalink
Merge pull request #299 from wealthfront/revert-plugin-mgmt
Browse files Browse the repository at this point in the history
Don't use version catalog for project level plugin mgmt
  • Loading branch information
cmathew committed Apr 24, 2024
2 parents 4898734 + 69585ee commit 6037af7
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 13 deletions.
20 changes: 15 additions & 5 deletions build.gradle
@@ -1,12 +1,22 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

plugins {
alias(libs.plugins.kotlin.gradle).apply(false)
alias(libs.plugins.kotlinter.gradle).apply(false)
alias(libs.plugins.kotlin.allopen).apply(false)
alias(libs.plugins.detekt)
buildscript {
repositories {
jcenter()
mavenCentral()
maven {url "https://plugins.gradle.org/m2/"}
google()
}
dependencies {
classpath(Plugins.kotlinGradle)
classpath(Plugins.kotlinterGradle)
classpath(Plugins.kotlinAllOpen)
classpath(Plugins.detekt)
}
}

apply plugin: 'io.gitlab.arturbosch.detekt'

allprojects {
apply from: "$rootDir/gradle/static-analysis.gradle"
apply plugin: "kotlin-allopen"
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/build.gradle
@@ -1,5 +1,5 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.8.21'
id 'org.jetbrains.kotlin.jvm' version '1.8.22'
}

repositories {
Expand All @@ -10,6 +10,7 @@ repositories {

dependencies {
implementation 'com.android.tools.build:gradle:8.1.2'
implementation 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22'
}

compileKotlin {
Expand Down
10 changes: 10 additions & 0 deletions buildSrc/src/main/java/Plugins.kt
@@ -0,0 +1,10 @@
import Versions.detektVersion
import Versions.kotlinVersion
import Versions.kotlinterVersion

object Plugins {
const val kotlinGradle = "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
const val kotlinterGradle = "org.jmailen.gradle:kotlinter-gradle:$kotlinterVersion"
const val kotlinAllOpen = "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
const val detekt = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion"
}
4 changes: 4 additions & 0 deletions buildSrc/src/main/java/Versions.kt
@@ -1,4 +1,8 @@
object Versions {
const val kotlinVersion = "1.8.22"
const val kotlinterVersion = "3.9.0"
const val detektVersion = "1.19.0"

const val compileSdkVersion = 34
const val minSdkVersion = 21
const val targetSdkVersion = 30
Expand Down
8 changes: 1 addition & 7 deletions gradle/libs.versions.toml
Expand Up @@ -101,10 +101,4 @@ lintApi = { group = "com.android.tools.lint", name = "lint-api", version.ref = "
lintChecks = { group = "com.android.tools.lint", name = "lint-checks", version.ref = "lint" }
lint = { group = "com.android.tools.lint", name = "lint", version.ref = "lint" }
lintTests = { group = "com.android.tools.lint", name = "lint-tests", version.ref = "lint" }
testUtils = { group = "com.android.tools", name = "testutils", version.ref = "lint" }

[plugins]
kotlin-gradle = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinter-gradle = { id = "org.jmailen.kotlinter", version.ref = "kotlinter" }
kotlin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlin" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
testUtils = { group = "com.android.tools", name = "testutils", version.ref = "lint" }

0 comments on commit 6037af7

Please sign in to comment.