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

MBS-10881 update to gradle 7.2 #1167

Merged
merged 1 commit into from
Aug 16, 2021
Merged
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
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
root = true

# See conf/detekt.yml, values should be the same

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
max_line_length = 120

ij_kotlin_imports_layout = *, java.**, javax.**, kotlin.**, ^
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,6 @@ dependencyResolutionManagement {
includeGroup("com.google.testing.platform")
}
}
/**
* This repo is used for kotlinx-html:0.7.2 (transitive dependency of current Detekt version)
* The new version of Detekt uses kotlinx-html:0.7.3, which is available in mavenCentral repo,
* so this block would become unnecessary. For more information about maven.pkg.jetbrains.space, see
* https://github.com/kotlin/kotlinx.html/wiki/Getting-started
* TODO: Remove this block after MBS-11267
*/
exclusiveContent {
forRepository {
maven {
setUrlOrProxy(
artifactoryUrl = artifactoryUrl,
repositoryName = "jetbrains-kotlinx-html",
originalRepo = "https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven"
)
}
}
filter {
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
}
}
exclusiveContent {
forRepository {
maven {
Expand Down
4 changes: 2 additions & 2 deletions build-logic/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ group = "com.avito.android.buildlogic"

dependencies {
implementation("com.avito.android.buildlogic:kotlin")
implementation(libs.kotlinPlugin)
implementation(libs.androidGradlePlugin)
implementation(libs.kotlinGradle)
implementation(libs.androidGradle)
// workaround for https://github.com/gradle/gradle/issues/15383
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}
10 changes: 6 additions & 4 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import io.gitlab.arturbosch.detekt.Detekt

plugins {
base
// accessing version catalog here will be supported in grale 7.2
// https://github.com/gradle/gradle/pull/17394
id("io.gitlab.arturbosch.detekt") version "1.16.0"
// accessing version catalog here is blocked by IDE false-postive error
// https://youtrack.jetbrains.com/issue/KTIJ-19369
id("io.gitlab.arturbosch.detekt") version "1.18.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the jetbrains-kotlin-html repo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

val detektAll = tasks.register<io.gitlab.arturbosch.detekt.Detekt>("detektAll") {
val detektAll = tasks.register<Detekt>("detektAll") {
description = "Runs over whole code base without the starting overhead for each module."
parallel = true
setSource(files(projectDir))
Expand Down
4 changes: 2 additions & 2 deletions build-logic/checks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ plugins {
group = "com.avito.android.buildlogic"

dependencies {
implementation(libs.gradleVersionsPlugin)
implementation(libs.detektPlugin)
implementation(libs.versionsGradle)
implementation(libs.detektGradle)
// workaround for https://github.com/gradle/gradle/issues/15383
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}
2 changes: 1 addition & 1 deletion build-logic/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ group = "com.avito.android.buildlogic"

dependencies {
implementation("com.avito.android.buildlogic:testing")
implementation(libs.kotlinPlugin)
implementation(libs.kotlinGradle)
implementation(libs.nebulaIntegTest)
}
2 changes: 1 addition & 1 deletion build-logic/publication/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
group = "com.avito.android.buildlogic"

dependencies {
implementation(libs.androidGradlePlugin)
implementation(libs.androidGradle)
implementation(libs.okhttp)
implementation(libs.kotson)
}
4 changes: 2 additions & 2 deletions build-logic/testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ plugins {
group = "com.avito.android.buildlogic"

dependencies {
implementation(libs.kotlinPlugin)
implementation(libs.kotlinGradle)
implementation(libs.nebulaIntegTest)
implementation(libs.gradleTestRetryPlugin)
implementation(libs.testRetryGradle)
// workaround for https://github.com/gradle/gradle/issues/15383
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ val samplesWrapper by tasks.registering(Copy::class) {
tasks.withType<Wrapper> {
// sources unavailable with BIN until https://youtrack.jetbrains.com/issue/IDEA-231667 resolved
distributionType = Wrapper.DistributionType.ALL
gradleVersion = "7.1"
gradleVersion = "7.2-rc-3"

finalizedBy(subprojectsWrapper, samplesWrapper)
}
Expand Down
5 changes: 3 additions & 2 deletions conf/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,9 @@ formatting:
active: false
AnnotationSpacing:
active: true
# todo fix and enable
ArgumentListWrapping:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pinterest/ktlint#1196
This is fixed too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's why I didn't update the Detekt version here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to run ktlint separately i think
MBS-11763

active: true
active: false
# questionable rule; && and || goes to the end of line, instead of beginning a new line as we do right now
ChainWrapping:
active: false
Expand All @@ -281,7 +282,7 @@ formatting:
insertFinalNewLine: false
ImportOrdering:
active: true
layout: 'idea'
layout: '*,java.**,javax.**,kotlin.**,^'
# blocked by bugs: https://github.com/pinterest/ktlint/issues?q=is%3Aissue+is%3Aopen+Indentation
Indentation:
active: false
Expand Down
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ androidX = "1.0.0"
espresso = "3.4.0"
coroutines = "1.3.8"
androidXTest = "1.4.0"
detekt = "1.16.0"
detekt = "1.18.0"
buildTools = "30.0.3"
compileSdk = "30"
targetSdk = "29"
Expand All @@ -15,7 +15,7 @@ junit5 = "5.7.2"
junit5Platform = "1.7.2"

[libraries]
kotlinPlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlinGradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlinTestJUnit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
kotlinXCli = "org.jetbrains.kotlinx:kotlinx-cli:0.2.1"
kotlinStdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
Expand Down Expand Up @@ -43,7 +43,7 @@ retrofitConverterScalars = { module = "com.squareup.retrofit2:converter-scalars"
gson = "com.google.code.gson:gson:2.8.5"
kotson = "com.github.salomonbrys.kotson:kotson:2.5.0"

androidGradlePlugin = "com.android.tools.build:gradle:4.2.2"
androidGradle = "com.android.tools.build:gradle:4.2.2"
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidX" }
material = { module = "com.google.android.material:material", version.ref = "androidX" }
recyclerView = "androidx.recyclerview:recyclerview:1.1.0"
Expand Down Expand Up @@ -82,8 +82,8 @@ okhttpMock = "com.github.gmazzo:okhttp-mock:1.4.0"
kotlinTest = "io.kotlintest:kotlintest:2.0.7"
coroutinesTest = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
nebulaIntegTest = "com.netflix.nebula:nebula-project-plugin:8.0.0"
gradleTestRetryPlugin = "org.gradle:test-retry-gradle-plugin:1.3.1"
gradleVersionsPlugin = "com.github.ben-manes:gradle-versions-plugin:0.39.0"
testRetryGradle = "org.gradle:test-retry-gradle-plugin:1.3.1"
versionsGradle = "com.github.ben-manes:gradle-versions-plugin:0.39.0"
junitJupiterApi = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit5" }
junitJupiterEngine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit5" }
junitPlatformRunner = { module = "org.junit.platform:junit-platform-runner", version.ref = "junit5Platform" }
Expand All @@ -98,5 +98,5 @@ googlePublish = "com.google.apis:google-api-services-androidpublisher:v3-rev86-1
googleAuthLibrary = "com.google.auth:google-auth-library-oauth2-http:0.10.0"
jdgraphtCore = "org.jgrapht:jgrapht-core:1.5.1"

detektPlugin = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
detektGradle = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
detektFormatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-rc-3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading