Skip to content

Commit

Permalink
Merge branch 'main' into kl/add_loading_state
Browse files Browse the repository at this point in the history
  • Loading branch information
kateliu20 authored Oct 14, 2024
2 parents 49824e7 + dd8cdb3 commit a2bb67e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ Changelog
**Unreleased**
--------------

0.20.1
------

_2024-10-14_

- **Fix**: Fall back to old property name for kotlin JVM args if the new one isn't found.
- **Enhancement**: Don't try to apply kotlin JVM args if there are none.

0.20.0
------

_2024-09-25_
_2024-10-11_

### Project Restructuring

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,17 +386,21 @@ internal constructor(
get() = optionalStringProperty("foundry.android.disabledVariants")

/**
* The Slack-specific kotlin.daemon.jvmargs computed by bootstrap.
* The project-specific kotlin.daemon.jvmargs computed by bootstrap.
*
* We don't just blanket use `kotlin.daemon.jvmargs` alone because we don't want to pollute other
* projects.
*/
public val kotlinDaemonArgs: String
public val kotlinDaemonArgs: List<String>?
get() =
stringProperty(
KOTLIN_DAEMON_ARGS_KEY,
defaultValue = stringProperty(KOTLIN_DAEMON_ARGS_KEY_OLD, defaultValue = ""),
)
optionalStringProperty(
KOTLIN_DAEMON_ARGS_KEY,
defaultValue = optionalStringProperty(KOTLIN_DAEMON_ARGS_KEY_OLD, defaultValue = null),
)
?.split(" ")
?.map(String::trim)
?.filterNot(String::isBlank)
?.takeUnless(List<*>::isNotEmpty)

/**
* Flag to enable ciUnitTest on this project. Default is true.
Expand Down Expand Up @@ -658,7 +662,7 @@ internal constructor(
get() = resolver.booleanValue("foundry.artifacts.configure-eagerly", defaultValue = false)

/**
* Force-disables Anvil regardless of `SlackExtension.dagger()` settings, useful for K2 testing
* Force-disables Anvil regardless of `FoundryExtension.dagger()` settings, useful for K2 testing
* where Anvil is unsupported.
*/
public val disableAnvilForK2Testing: Boolean
Expand Down Expand Up @@ -778,7 +782,7 @@ internal constructor(

public companion object {
/**
* The Slack-specific kotlin.daemon.jvmargs computed by bootstrap.
* The project-specific kotlin.daemon.jvmargs computed by bootstrap.
*
* We don't just blanket use `kotlin.daemon.jvmargs` alone because we don't want to pollute
* other projects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import org.gradle.jvm.toolchain.JvmVendorSpec
/** Registry of global configuration info. */
public class GlobalConfig
private constructor(
internal val kotlinDaemonArgs: List<String>,
internal val kotlinDaemonArgs: List<String>?,
internal val errorProneCheckNamesAsErrors: List<String>,
internal val affectedProjects: Set<String>?,
internal val jvmVendor: JvmVendorSpec?,
Expand All @@ -32,7 +32,7 @@ private constructor(
check(project == project.rootProject) { "Project is not root project!" }
val globalFoundryProperties = FoundryProperties(project)
return GlobalConfig(
kotlinDaemonArgs = globalFoundryProperties.kotlinDaemonArgs.split(" "),
kotlinDaemonArgs = globalFoundryProperties.kotlinDaemonArgs,
errorProneCheckNamesAsErrors =
globalFoundryProperties.errorProneCheckNamesAsErrors?.split(":").orEmpty(),
affectedProjects =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ internal object KgpTasks {
project.pluginManager.onFirst(KGP_PLUGINS) {
val kotlinExtension = project.kotlinExtension
kotlinExtension.apply {
kotlinDaemonJvmArgs = foundryTools.globalConfig.kotlinDaemonArgs
foundryTools.globalConfig.kotlinDaemonArgs?.let { kotlinDaemonJvmArgs = it }
foundryProperties.versions.jdk.ifPresent { jdkVersion ->
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(jdkVersion))
Expand Down

0 comments on commit a2bb67e

Please sign in to comment.