Skip to content

Commit

Permalink
Normalize plugin application syntax
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 83aa8560df9c914640751b7062d3824555a730a2
  • Loading branch information
staktrace authored and svc-squareup-copybara committed Jan 27, 2025
1 parent 3b8a49b commit 5576bc6
Show file tree
Hide file tree
Showing 85 changed files with 193 additions and 221 deletions.
34 changes: 10 additions & 24 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,20 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.io.IOException
import java.net.Socket

buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
classpath(platform(libs.kotlinBom))
classpath(libs.detektGradlePlugin)
classpath(libs.dokkaGradlePlugin)
// TODO remove Flyway when Misk SchemaMigratorGradlePlugin merges
classpath(libs.flywayGradlePlugin)
classpath(libs.jgit)
classpath(libs.jooqGradlePlugin)
classpath(libs.kotlinAllOpenPlugin)
classpath(libs.kotlinGradlePlugin)
classpath(libs.kotlinNoArgPlugin)
classpath(libs.mysql)
classpath(libs.protobufGradlePlugin)
classpath(libs.sqldelightGradlePlugin)
classpath(libs.wireGradlePlugin)
}
}

plugins {
alias(libs.plugins.dependencyAnalysis)
alias(libs.plugins.binaryCompatibilityValidator)
alias(libs.plugins.detekt) apply false
alias(libs.plugins.dokka) apply false
alias(libs.plugins.flyway) apply false
alias(libs.plugins.jooq) apply false
alias(libs.plugins.kotlinAllOpen) apply false
alias(libs.plugins.kotlinJpa) apply false
alias(libs.plugins.kotlinJvm) apply false
alias(libs.plugins.mavenPublishBase) apply false
alias(libs.plugins.protobuf) apply false
alias(libs.plugins.sqldelight) apply false
alias(libs.plugins.wire) apply false
}

dependencyAnalysis {
Expand Down
4 changes: 2 additions & 2 deletions detektive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
33 changes: 11 additions & 22 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ datadog = "1.45.2"
dependencyAnalysisPlugin = "2.7.0"
detekt = "1.23.7"
docker = "3.4.1"
flyway = "11.2.0"
googleAuth = "1.31.0"
googleHttp = "1.45.3"
hoplite = "2.7.5"
Expand All @@ -21,7 +20,6 @@ micrometer = "1.12.13"
netty = "4.1.117.Final"
okHttp = "5.0.0-alpha.14"
protobuf = "3.25.6"
protobufPlugin = "0.9.4"
retrofit = "2.11.0"
sqldelight = "2.0.2"
wire = "5.2.1"
Expand Down Expand Up @@ -54,7 +52,6 @@ concurrencyLimitsCore = { module = "com.netflix.concurrency-limits:concurrency-l
cronUtils = { module = "com.cronutils:cron-utils", version = "9.2.1" }
datasourceProxy = { module = "net.ttddyy:datasource-proxy", version = "1.10.1" }
detektApi = { module = "io.gitlab.arturbosch.detekt:detekt-api", version.ref = "detekt" }
detektGradlePlugin = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
detektParser = { module = "io.gitlab.arturbosch.detekt:detekt-parser", version.ref = "detekt" }
detektPsiUtils = { module = "io.gitlab.arturbosch.detekt:detekt-psi-utils", version.ref = "detekt" }
detektTest = { module = "io.gitlab.arturbosch.detekt:detekt-test", version.ref = "detekt" }
Expand All @@ -63,10 +60,8 @@ dockerApi = { module = "com.github.docker-java:docker-java-api", version.ref = "
dockerCore = { module = "com.github.docker-java:docker-java-core", version.ref = "docker" }
dockerTransportCore = { module = "com.github.docker-java:docker-java-transport", version.ref = "docker" }
dockerTransportHttpClient = { module = "com.github.docker-java:docker-java-transport-httpclient5", version.ref = "docker" }
dokkaGradlePlugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "2.0.0" }
errorproneAnnotations = { module = "com.google.errorprone:error_prone_annotations", version = "2.36.0" }
findbugsJsr305 = { module = "com.google.code.findbugs:jsr305", version = "3.0.2" }
flywayGradlePlugin = { module = "org.flywaydb:flyway-gradle-plugin", version.ref = "flyway" }
gax = { module = "com.google.api:gax", version = "2.59.1" }
gcpCloudCore = { module = "com.google.cloud:google-cloud-core", version = "2.49.1" }
gcpDatastore = { module = "com.google.cloud:google-cloud-datastore", version = "2.25.4" }
Expand Down Expand Up @@ -134,10 +129,8 @@ jettyUnixSocket = { module = "org.eclipse.jetty:jetty-unixsocket-server" }
jettyUtil = { module = "org.eclipse.jetty:jetty-util" }
jettyWebsocketApi = { module = "org.eclipse.jetty.websocket:websocket-jetty-api" }
jettyWebsocketServer = { module = "org.eclipse.jetty.websocket:websocket-jetty-server" }
jgit = { module = "org.eclipse.jgit:org.eclipse.jgit", version = "5.13.3.202401111512-r" }
jnrUnixsocket = { module = "com.github.jnr:jnr-unixsocket", version = "0.38.23" }
jooq = { module = "org.jooq:jooq", version = "3.18.25" }
jooqGradlePlugin = { module = "nu.studer:gradle-jooq-plugin", version = "9.0" }
jsqlparser = { module = "com.github.jsqlparser:jsqlparser", version = "5.1" }
junitApi = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
junitEngine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
Expand All @@ -148,11 +141,9 @@ kotestAssertionsShared = { module = "io.kotest:kotest-assertions-shared", versio
kotestCommon = { module = "io.kotest:kotest-common", version.ref = "kotest" }
kotestFrameworkApi = { module = "io.kotest:kotest-framework-api", version.ref = "kotest" }
kotestJunitRunnerJvm = { module = "io.kotest:kotest-runner-junit5-jvm", version.ref = "kotest" }
kotlinAllOpenPlugin = { module = "org.jetbrains.kotlin:kotlin-allopen", version.ref = "kotlin" }
kotlinBom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
kotlinCompilerEmbeddable = { module = "org.jetbrains.kotlin:kotlin-compiler-embeddable", version.ref = "kotlin" }
kotlinGradleBom = { module = "org.jetbrains.kotlin:kotlin-gradle-plugins-bom", version.ref = "kotlin" }
kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlinNoArgPlugin = { module = "org.jetbrains.kotlin:kotlin-noarg", version.ref = "kotlin" }
kotlinReflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlinRetry = { module = "com.michael-bull.kotlin-retry:kotlin-retry", version = "1.0.9" }
Expand All @@ -169,7 +160,6 @@ launchDarkly = { module = "com.launchdarkly:launchdarkly-java-server-sdk", versi
logbackClassic = { module = "ch.qos.logback:logback-classic", version = "1.5.6" }
logbackCore = { module = "ch.qos.logback:logback-core", version = "1.5.6" }
loggingApi = { module = "io.github.microutils:kotlin-logging", version = "3.0.5" }
mavenPublishGradlePlugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "mavenPublish" }
micrometerCore = { module = "io.micrometer:micrometer-core", version.ref = "micrometer" }
micrometerRegistryPrometheus = { module = "io.micrometer:micrometer-registry-prometheus", version.ref = "micrometer" }
mockitoCore = { module = "org.mockito:mockito-core", version = "5.15.2" }
Expand All @@ -196,7 +186,6 @@ prometheusClientBom = { module = "io.prometheus:simpleclient_bom", version = "0.
prometheusClientCommon = { module = "io.prometheus:simpleclient_common" }
prometheusHotspot = { module = "io.prometheus:simpleclient_hotspot" }
prometheusHttpserver = { module = "io.prometheus:simpleclient_httpserver" }
protobufGradlePlugin = { module = "com.google.protobuf:protobuf-gradle-plugin", version.ref = "protobufPlugin" }
protobufJava = { module = "com.google.protobuf:protobuf-java", version.ref = "protobuf" }
protoc = { module = "com.google.protobuf:protoc", version.ref = "protobuf" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
Expand All @@ -207,7 +196,6 @@ retrofitScalars = { module = "com.squareup.retrofit2:converter-scalars", version
retrofitWire = { module = "com.squareup.retrofit2:converter-wire", version.ref = "retrofit" }
servletApi = { module = "javax.servlet:javax.servlet-api", version = "4.0.1" }
slf4jApi = { module = "org.slf4j:slf4j-api", version = "2.0.16" }
sqldelightGradlePlugin = { module = "app.cash.sqldelight:gradle-plugin", version.ref = "sqldelight" }
sqldelightJdbcDriver = { module = "app.cash.sqldelight:jdbc-driver", version.ref = "sqldelight" }
sqldelightMysqlDialect = { module = "app.cash.sqldelight:mysql-dialect", version.ref = "sqldelight" }
sqldelightRuntime = { module = "app.cash.sqldelight:runtime", version.ref = "sqldelight" }
Expand All @@ -226,7 +214,6 @@ tinkAwskms = { module = "com.google.crypto.tink:tink-awskms", version = "1.9.1"
tinkGcpkms = { module = "com.google.crypto.tink:tink-gcpkms", version = "1.10.0" }
tracingDatadog = { module = "com.datadoghq:dd-trace-api", version.ref = "datadog" }
wireBom = { module = "com.squareup.wire:wire-bom", version.ref = "wire" }
wireGradlePlugin = { module = "com.squareup.wire:wire-gradle-plugin", version.ref = "wire" }
wireGrpcClient = { module = "com.squareup.wire:wire-grpc-client", version.ref = "wire" }
wireMoshiAdapter = { module = "com.squareup.wire:wire-moshi-adapter", version.ref = "wire" }
wireReflector = { module = "com.squareup.wire:wire-reflector", version.ref = "wire" }
Expand All @@ -236,13 +223,15 @@ wireSchema = { module = "com.squareup.wire:wire-schema", version.ref = "wire" }
[plugins]
binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinBinaryCompatibilityPlugin" }
dependencyAnalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysisPlugin" }
flyway = { id = "org.flywaydb.flyway" }
jooq = { id = "nu.studer.jooq" }
kotlinAllOpen = { id = "org.jetbrains.kotlin.plugin.allopen" }
kotlinJpa = { id = "org.jetbrains.kotlin.plugin.jpa" }
kotlinJvm = { id = "org.jetbrains.kotlin.jvm" }
mavenPublish = { id = "com.vanniktech.maven.publish" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
dokka = { id = "org.jetbrains.dokka", version = "2.0.0" }
flyway = { id = "org.flywaydb.flyway", version = "11.2.0" }
jooq = { id = "nu.studer.jooq", version = "9.0" }
kotlinAllOpen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlin" }
kotlinJpa = { id = "org.jetbrains.kotlin.plugin.jpa", version.ref = "kotlin" }
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish" }
mavenPublishBase = { id = "com.vanniktech.maven.publish.base", version.ref = "mavenPublish" }
protobuf = { id = "com.google.protobuf" }
sqldelight = { id = "app.cash.sqldelight" }
wire = { id = "com.squareup.wire" }
protobuf = { id = "com.google.protobuf", version = "0.9.4" }
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
wire = { id = "com.squareup.wire", version.ref = "wire" }
4 changes: 2 additions & 2 deletions misk-action-scopes/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-actions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions misk-admin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import java.io.ByteArrayOutputStream
import java.nio.charset.Charset

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
alias(libs.plugins.wire)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
id("com.squareup.wire")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import com.vanniktech.maven.publish.KotlinJvm
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-aws-dynamodb/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
id("java-test-fixtures")
}

Expand Down
4 changes: 2 additions & 2 deletions misk-aws/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-aws2-dynamodb/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
id("java-test-fixtures")
}

Expand Down
4 changes: 2 additions & 2 deletions misk-backoff/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion misk-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-platform")
alias(libs.plugins.mavenPublishBase)
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-clustering-dynamodb/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-clustering/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-config/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-cron/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-crypto/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
id("java-test-fixtures")
}

Expand Down
4 changes: 2 additions & 2 deletions misk-datadog/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-events-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-events/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
id("java-test-fixtures")
}

Expand Down
4 changes: 2 additions & 2 deletions misk-exceptions-dynamodb/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions misk-feature/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm

plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublishBase)
id("org.jetbrains.kotlin.jvm")
id("com.vanniktech.maven.publish.base")
id("java-test-fixtures")
}

Expand Down
Loading

0 comments on commit 5576bc6

Please sign in to comment.