Skip to content

Commit

Permalink
Merge pull request #1016 from square/rick/build-logic_conventions
Browse files Browse the repository at this point in the history
move convention plugins from `buildSrc` to an included `build-logic` project
  • Loading branch information
RBusarow authored Jun 9, 2023
2 parents 42ef981 + ec36342 commit dad9819
Show file tree
Hide file tree
Showing 64 changed files with 121 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import com.squareup.workflow1.version

plugins {
id("com.android.application")
`kotlin-android`
id("kotlin-android")
id("kotlin-parcelize")
}
android {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ buildscript {

plugins {
base
`artifacts-check`
`dependency-guard`
id("artifacts-check")
id("dependency-guard")
}

subprojects {
Expand Down
23 changes: 22 additions & 1 deletion dependencies/classpath.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:
androidx.databinding:databinding-common:7.4.1
androidx.databinding:databinding-compiler-common:7.4.1
com.android.databinding:baseLibrary:7.4.1
Expand Down Expand Up @@ -38,6 +39,7 @@ com.android.tools:sdk-common:30.4.1
com.android.tools:sdklib:30.4.1
com.android:signflinger:7.4.1
com.android:zipflinger:7.4.1
com.dropbox.dependency-guard:dependency-guard:0.1.0
com.fasterxml.jackson.core:jackson-annotations:2.12.7
com.fasterxml.jackson.core:jackson-core:2.12.7
com.fasterxml.jackson.core:jackson-databind:2.12.7.1
Expand Down Expand Up @@ -66,6 +68,15 @@ com.google.protobuf:protobuf-java:3.17.2
com.google.testing.platform:core-proto:0.0.8-alpha08
com.googlecode.java-diff-utils:diffutils:1.3.0
com.googlecode.juniversalchardet:juniversalchardet:1.0.3
com.pinterest.ktlint:ktlint-core:0.47.1
com.pinterest.ktlint:ktlint-reporter-checkstyle:0.47.1
com.pinterest.ktlint:ktlint-reporter-html:0.47.1
com.pinterest.ktlint:ktlint-reporter-json:0.47.1
com.pinterest.ktlint:ktlint-reporter-plain:0.47.1
com.pinterest.ktlint:ktlint-reporter-sarif:0.47.1
com.pinterest.ktlint:ktlint-ruleset-experimental:0.47.1
com.pinterest.ktlint:ktlint-ruleset-standard:0.47.1
com.squareup.moshi:moshi-adapters:1.13.0
com.squareup.moshi:moshi:1.13.0
com.squareup.okhttp3:okhttp:4.10.0
com.squareup.okio:okio-jvm:3.0.0
Expand All @@ -82,6 +93,8 @@ com.vanniktech:nexus:0.22.0
commons-codec:commons-codec:1.11
commons-io:commons-io:2.4
commons-logging:commons-logging:1.2
io.github.detekt.sarif4k:sarif4k:0.0.1
io.github.microutils:kotlin-logging-jvm:2.1.23
io.grpc:grpc-api:1.39.0
io.grpc:grpc-context:1.39.0
io.grpc:grpc-core:1.39.0
Expand Down Expand Up @@ -118,6 +131,7 @@ org.bouncycastle:bcprov-jdk15on:1.67
org.checkerframework:checker-qual:3.5.0
org.codehaus.mojo:animal-sniffer-annotations:1.19
org.codehaus.woodstox:stax2-api:4.2.1
org.ec4j.core:ec4j-core:0.3.0
org.glassfish.jaxb:jaxb-runtime:2.3.2
org.glassfish.jaxb:txw2:2.3.2
org.jdom:jdom2:2.0.6
Expand All @@ -126,6 +140,7 @@ org.jetbrains.dokka:dokka-gradle-plugin:1.8.10
org.jetbrains.intellij.deps:trove4j:1.0.20200330
org.jetbrains.kotlin:kotlin-android-extensions:1.7.20
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.7.20
org.jetbrains.kotlin:kotlin-bom:1.7.20
org.jetbrains.kotlin:kotlin-build-common:1.7.20
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.20
org.jetbrains.kotlin:kotlin-compiler-runner:1.7.20
Expand All @@ -140,6 +155,7 @@ org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.7.20
org.jetbrains.kotlin:kotlin-native-utils:1.7.20
org.jetbrains.kotlin:kotlin-project-model:1.7.20
org.jetbrains.kotlin:kotlin-reflect:1.6.21
org.jetbrains.kotlin:kotlin-script-runtime:1.7.20
org.jetbrains.kotlin:kotlin-scripting-common:1.7.20
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.20
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.20
Expand All @@ -157,9 +173,14 @@ org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.3
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.3
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3
org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.5.0
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.1.0
org.jetbrains.kotlinx:kotlinx-serialization-core:1.1.0
org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.1.0
org.jetbrains.kotlinx:kotlinx-serialization-json:1.1.0
org.jetbrains:annotations:13.0
org.jetbrains:markdown-jvm:0.3.1
org.jetbrains:markdown:0.3.1
org.jmailen.gradle:kotlinter-gradle:3.12.0
org.json:json:20180813
org.jsoup:jsoup:1.15.3
org.jvnet.staxex:stax-ex:1.8.1
Expand All @@ -168,7 +189,7 @@ org.ow2.asm:asm-commons:9.2
org.ow2.asm:asm-tree:9.2
org.ow2.asm:asm-util:9.2
org.ow2.asm:asm:9.2
org.slf4j:slf4j-api:1.7.30
org.slf4j:slf4j-api:1.7.32
org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2
xerces:xercesImpl:2.12.0
xml-apis:xml-apis:1.4.01
4 changes: 2 additions & 2 deletions internal-testing-utils/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
`kotlin-jvm`
published
id("kotlin-jvm")
id("published")
}

dependencies {
Expand Down
8 changes: 4 additions & 4 deletions samples/compose-samples/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
`compose-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
id("compose-ui-tests")
}

android {
Expand Down
4 changes: 2 additions & 2 deletions samples/containers/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("com.android.library")
`kotlin-android`
`android-defaults`
id("kotlin-android")
id("android-defaults")
}

android {
Expand Down
6 changes: 3 additions & 3 deletions samples/containers/app-poetry/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
}

android {
Expand Down
6 changes: 3 additions & 3 deletions samples/containers/app-raven/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
}

android {
Expand Down
2 changes: 1 addition & 1 deletion samples/containers/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
`kotlin-jvm`
id("kotlin-jvm")
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions samples/containers/hello-back-button/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
id("kotlin-parcelize")
}

Expand Down
4 changes: 2 additions & 2 deletions samples/containers/poetry/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("com.android.library")
`kotlin-android`
`android-defaults`
id("kotlin-android")
id("android-defaults")
}

android {
Expand Down
6 changes: 3 additions & 3 deletions samples/dungeon/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
}

android {
Expand Down
2 changes: 1 addition & 1 deletion samples/dungeon/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
`kotlin-jvm`
id("kotlin-jvm")
id("kotlinx-serialization")
}

Expand Down
4 changes: 2 additions & 2 deletions samples/dungeon/timemachine-shakeable/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("com.android.library")
`kotlin-android`
`android-defaults`
id("kotlin-android")
id("android-defaults")
}

android {
Expand Down
2 changes: 1 addition & 1 deletion samples/dungeon/timemachine/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
`kotlin-jvm`
id("kotlin-jvm")
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion samples/hello-terminal/hello-terminal-app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
application
`kotlin-jvm`
id("kotlin-jvm")
}

application.mainClassName = "com.squareup.sample.helloterminal.MainKt"
Expand Down
2 changes: 1 addition & 1 deletion samples/hello-terminal/terminal-workflow/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
`kotlin-jvm`
id("kotlin-jvm")
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion samples/hello-terminal/todo-terminal-app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
application
`kotlin-jvm`
id("kotlin-jvm")
}

application.mainClassName = "com.squareup.sample.hellotodo.MainKt"
Expand Down
6 changes: 3 additions & 3 deletions samples/hello-workflow-fragment/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
}

android {
Expand Down
6 changes: 3 additions & 3 deletions samples/hello-workflow/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
}

android {
Expand Down
6 changes: 3 additions & 3 deletions samples/nested-overlays/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
}

android {
Expand Down
6 changes: 3 additions & 3 deletions samples/stub-visibility/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
}

android {
Expand Down
6 changes: 3 additions & 3 deletions samples/tictactoe/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
}

android {
Expand Down
2 changes: 1 addition & 1 deletion samples/tictactoe/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
`kotlin-jvm`
id("kotlin-jvm")
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions samples/todo-android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.application")
`kotlin-android`
`android-sample-app`
`android-ui-tests`
id("kotlin-android")
id("android-sample-app")
id("android-ui-tests")
}

android {
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pluginManagement {
// For binary compatibility validator.
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
}
includeBuild("build-logic")
}

plugins {
Expand Down
4 changes: 2 additions & 2 deletions trace-encoder/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
`kotlin-jvm`
id("kotlin-jvm")
id("com.google.devtools.ksp")
published
id("published")
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions workflow-config/config-android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.android.library")
`kotlin-android`
`android-defaults`
published
id("kotlin-android")
id("android-defaults")
id("published")
}

android {
Expand Down
4 changes: 2 additions & 2 deletions workflow-config/config-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
`java-library`
`kotlin-jvm`
published
id("kotlin-jvm")
id("published")
}

tasks.withType<Test> {
Expand Down
4 changes: 2 additions & 2 deletions workflow-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import com.squareup.workflow1.buildsrc.iosWithSimulatorArm64

plugins {
`kotlin-multiplatform`
published
id("kotlin-multiplatform")
id("published")
}

kotlin {
Expand Down
4 changes: 2 additions & 2 deletions workflow-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import com.squareup.workflow1.buildsrc.iosWithSimulatorArm64

plugins {
`kotlin-multiplatform`
published
id("kotlin-multiplatform")
id("published")
}

kotlin {
Expand Down
Loading

0 comments on commit dad9819

Please sign in to comment.