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

Update sgp to v0.19.6 #1672

Merged
merged 7 commits into from
Oct 8, 2024
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
8 changes: 4 additions & 4 deletions app-scaffold/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
import com.google.devtools.ksp.gradle.KspAATask
import com.google.devtools.ksp.gradle.KspTaskJvm
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import slack.gradle.SlackProperties
import foundry.gradle.FoundryProperties

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
alias(libs.plugins.apollo)
alias(libs.plugins.anvil)
alias(libs.plugins.ksp)
Expand All @@ -33,7 +33,7 @@ plugins {

kotlin { compilerOptions { optIn.add("androidx.compose.material3.ExperimentalMaterial3Api") } }

slack {
foundry {
@Suppress("OPT_IN_USAGE")
features {
compose {
Expand Down Expand Up @@ -93,7 +93,7 @@ apollo {
}
}

val anvilMode = SlackProperties(project).anvilMode
val anvilMode = FoundryProperties(project).anvilMode

if (!anvilMode.useDaggerKsp) {
apply(plugin = libs.plugins.kotlin.kapt.get().pluginId)
Expand Down
7 changes: 5 additions & 2 deletions app-scaffold/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
slack.gradle.config.libraryWithVariants=true
slack.ci-unit-test.variant=debug
foundry.android.libraryWithVariants=true
foundry.ci-unit-test.variant=debug
# TODO remove in AGP 8.8 after it's fixed
# https://issuetracker.google.com/issues/372062075
foundry.compose.useIncludeInformationWorkaround=false
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import okio.source
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
alias(libs.plugins.licensee)
alias(libs.plugins.bugsnag)
alias(libs.plugins.baselineprofile)
Expand Down
6 changes: 3 additions & 3 deletions app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
slack.ci-unit-test.enable=false
slack.gradle.config.bugsnag.enabledBranchPattern=(main|release_.*)
slack.gradle.config.bugsnag.enabled=true
foundry.ci-unit-test.enable=false
foundry.android.bugsnag.enabledBranchPattern=(main|release_.*)
foundry.android.bugsnag.enabled=true
4 changes: 2 additions & 2 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (C) 2022 Slack Technologies, LLC
// SPDX-License-Identifier: Apache-2.0
import com.android.build.api.dsl.ManagedVirtualDevice
import slack.gradle.isCi
import foundry.gradle.isCi

plugins {
alias(libs.plugins.android.test)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
alias(libs.plugins.baselineprofile)
}

Expand Down
6 changes: 3 additions & 3 deletions benchmark/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
slack.ci-unit-test.enable=false
slack.ci-lint.enable=false
foundry.ci-unit-test.enable=false
foundry.ci-lint.enable=false

# Not supported yet in DAGP
# https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/issues/797
slack.gradle.config.enableAnalysisPlugin=false
foundry.enableAnalysisPlugin=false
4 changes: 2 additions & 2 deletions bookmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
alias(libs.plugins.anvil)
}

Expand Down Expand Up @@ -54,7 +54,7 @@ kotlin {

android { namespace = "catchup.bookmarks" }

slack {
foundry {
features {
dagger()
}
Expand Down
4 changes: 2 additions & 2 deletions bookmarks/db/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
alias(libs.plugins.sqldelight)
}

Expand All @@ -41,7 +41,7 @@ kotlin {

android { namespace = "catchup.bookmarks.db" }

slack {
foundry {
features {
dagger()
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.android.test) apply false
alias(libs.plugins.sgp.root)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.root)
alias(libs.plugins.foundry.base)
alias(libs.plugins.spotless) apply false
alias(libs.plugins.doctor) apply false
alias(libs.plugins.ksp) apply false
Expand Down
3 changes: 3 additions & 0 deletions config/lint/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
<!-- Something is up with EnsureInitializerMetadata -->
<issue id="UnknownIssueId" severity="ignore" />

<!-- Too noisy and only really from slack -->
<issue id="AvoidUsingNotNullOperator" severity="ignore" />

<!-- Slack-specific -->
<issue id="RawDispatchersUse,DeprecatedCall,MoshiUsageEnumMissingUnknown,MainScopeUsage" severity="ignore" />
</lint>
57 changes: 31 additions & 26 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8

# Kapt controls
kapt.include.compile.classpath=false

# Enable when it works
kapt.use.k2=false

Expand Down Expand Up @@ -77,25 +78,26 @@ android.library.defaults.buildfeatures.androidresources=false
# Gradle's auto-provisioning of JDKs doesn't properly support Apple Silicon
org.gradle.java.installations.auto-download=false

slack.robolectricTestSdks=28,29,30,31,32,33
slack.robolectricIVersion=4
slack.compileSdkVersion=android-35
slack.minSdkVersion=29
slack.targetSdkVersion=35
slack.latestCompileSdkWithSources=35
slack.location.slack-platform=:platform
foundry.android.defaultNamespacePrefix=catchup
foundry.android.robolectric.testSdks=28,29,30,31,32,33
foundry.android.robolectric.iVersion=4
foundry.android.compileSdkVersion=android-35
foundry.android.minSdkVersion=29
foundry.android.targetSdkVersion=35
foundry.android.latestCompileSdkWithSources=35
foundry.location.foundry-platform=:platform

# Dependency sorter doesn't really work on KMP projects
slack.sortDependencies.ignore=:service-api,:bookmarks
foundry.sortDependencies.ignore=:service-api,:bookmarks

#slack.detekt.configs=config/detekt/detekt.yml
#foundry.detekt.configs=config/detekt/detekt.yml
slack.detekt.baseline=config/detekt/baseline.xml

slack.allow-ksp=true
slack.allow-moshi-ir=true
slack.auto-apply.detekt=false
slack.log-thermals=true
slack.lint.baseline-file-name=lint-baseline.xml
foundry.ksp.enable=true
foundry.moshi.ir.enable=true
foundry.auto-apply.detekt=false
foundry.logging.thermals=true
foundry.lint.baseline-file-name=lint-baseline.xml

# K1_KSP_ONLY - KSP1 - yes
# K2_KSP_ONLY - KSP1 - yes
Expand All @@ -104,24 +106,24 @@ slack.lint.baseline-file-name=lint-baseline.xml
# K2_KSP_KAPT - KAPT K2 - KSP1 - no
# K2_KSP_KAPT - KAPT K1 - KSP1 - yes
# K2_KSP_KAPT - KAPT K1 - KSP2 - yes
sgp.anvil.mode=K2_KSP_KAPT
foundry.anvil.mode=K2_KSP_KAPT

# Use the anvil-ksp fork
sgp.anvil.useKspFork=true
foundry.anvil.useKspFork=true

com.squareup.anvil.kspContributingAnnotations=com.slack.circuit.codegen.annotations.CircuitInject

# Temporary due to K2 KAPT emitting a warning
slack.allowWarnings=true

sgp.beta=true
foundry.beta=true

# Use Zulu for auto-configured JDK downloads.
sgp.config.jvmVendor=AZUL
foundry.jvm.vendor=AZUL

sgp.compose.commonCompilerOptions=strongSkipping=true
foundry.compose.commonCompilerOptions=sourceInformation=true

sgp.kotlin.optIns=\
foundry.kotlin.optIns=\
kotlin.ExperimentalStdlibApi,\
kotlin.contracts.ExperimentalContracts,\
kotlin.experimental.ExperimentalTypeInference,\
Expand All @@ -134,7 +136,7 @@ sgp.kotlin.optIns=\
# -Xself-upper-bound-inference
# Support inferring type arguments based on only self upper bounds of the corresponding
# type parameters
sgp.kotlin.freeArgs=\
foundry.kotlin.freeArgs=\
-Xenhance-type-parameter-types-to-def-not-null,\
-Xself-upper-bound-inference

Expand All @@ -150,14 +152,17 @@ sgp.kotlin.freeArgs=\
# Enable new jvm-default behavior
# https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-generating-default-methods-in-interfaces/
# -Xtype-enhancement-improvements-strict-mode
sgp.kotlin.jvmFreeArgs=\
foundry.kotlin.jvmFreeArgs=\
-Xassertions=jvm,\
-Xemit-jvm-type-annotations,\
-Xjspecify-annotations=strict,\
-Xjsr305=strict,\
-Xjvm-default=all,\
-Xtype-enhancement-improvements-strict-mode

foundry.kotlin.progressive=true
foundry.kapt.languageVersion=1.9

# Disable noisy logging about mismatched KSP and Kotlin versions
ksp.version.check=false

Expand All @@ -174,11 +179,11 @@ android.disableResourceValidation=true
# Disable DAGP's noisy warning about supported versions
dependency.analysis.compatibility=NONE

# SGP: https://github.com/slackhq/slack-gradle-plugin
#systemProp.slack.include-build.sgp=/path/to/slack-gradle-plugin
# Foundry: https://github.com/slackhq/foundry
#systemProp.catchup.include-build.foundry=/path/to/foundry

# DAGP: https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin
#systemProp.slack.include-build.dagp=/path/to/dependency-analysis-gradle-plugin
#systemProp.catchup.include-build.dagp=/path/to/dependency-analysis-gradle-plugin

# Anvil: https://github.com/square/anvil
#systemProp.slack.include-build.anvil=/path/to/anvil
#systemProp.catchup.include-build.anvil=/path/to/anvil
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ preferences = "1.2.1"
retrofit = "2.11.0"
slack-lint = "0.8.1"
sortDependencies = "0.8"
sgp = "0.19.1"
foundry = "0.20.0-alpha03"
spotless = "7.0.0.BETA2"
sqldelight = "2.0.2"
telephoto = "0.13.0"
Expand Down Expand Up @@ -72,8 +72,8 @@ moshix = { id = "dev.zacsweers.moshix", version.ref = "moshix" }
playPublisher = { id = "com.github.triplet.play", version = "3.11.0" }
redacted = { id = "dev.zacsweers.redacted", version = "1.10.0" }
retry = { id = "org.gradle.test-retry", version = "1.6.0" }
sgp-base = { id = "com.slack.gradle.base", version.ref = "sgp" }
sgp-root = { id = "com.slack.gradle.root", version.ref = "sgp" }
foundry-base = { id = "com.slack.foundry.base", version.ref = "foundry" }
foundry-root = { id = "com.slack.foundry.root", version.ref = "foundry" }
sortDependencies = { id = "com.squareup.sort-dependencies", version.ref = "sortDependencies" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
Expand Down
2 changes: 1 addition & 1 deletion libraries/appconfig/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion libraries/auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
alias(libs.plugins.moshix)
}

Expand Down
4 changes: 2 additions & 2 deletions libraries/base-ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

plugins {
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}
Expand All @@ -24,7 +24,7 @@ android {
namespace = "catchup.ui.core"
}

slack {
foundry {
features {
compose()
dagger()
Expand Down
4 changes: 2 additions & 2 deletions libraries/compose-extensions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
}

android { namespace = "catchup.compose" }

slack { features { compose() } }
foundry { features { compose() } }

dependencies {
api(libs.androidx.compose.accompanist.systemUi)
Expand Down
4 changes: 2 additions & 2 deletions libraries/deeplinking/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}

slack {
foundry {
features {
dagger()
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/di/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
}

slack {
foundry {
features {
daggerRuntimeOnly()
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/di/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion libraries/flowbinding/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
}

android {
Expand Down
4 changes: 2 additions & 2 deletions libraries/gemoji/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

plugins {
alias(libs.plugins.sgp.base)
alias(libs.plugins.foundry.base)
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}
Expand All @@ -24,7 +24,7 @@ android {
namespace = "catchup.gemoji"
}

slack {
foundry {
features {
dagger()
}
Expand Down
Loading
Loading