Conversation
| spotless { | ||
| kotlin { | ||
| target("**/*.kt") | ||
| ktlint().editorConfigOverride(mapOf("indent_size" to "2", "max_line_length" to "120")) | ||
| trimTrailingWhitespace() | ||
| leadingTabsToSpaces() | ||
| endWithNewline() | ||
| } | ||
| } |
There was a problem hiding this comment.
We don't want to use spotless when we're a dependency
| plugins { | ||
| id("com.android.library") | ||
| id("org.jetbrains.kotlin.android") | ||
| id("com.diffplug.spotless") version "7.0.4" |
| val libVersion = json["version"] as String | ||
| val (major, minor, patch) = libVersion.split(".") | ||
|
|
||
| return Triple(major.toInt(), minor.toInt(), patch.toInt()) |
There was a problem hiding this comment.
In what way does this break when one of the segments is not a number (i.e. 0-rc.1)?
| apply(plugin = "com.facebook.react") | ||
| } | ||
|
|
||
| fun safeExtGet(prop: String, fallback: Any?): Any? = |
| dirs += "common/src/main/java" | ||
| dirs += "noreanimated/src/main/java" |
There was a problem hiding this comment.
Actually, can those two be merged into noreanimated (likely another PR)?
| // TODO: Delete this block: | ||
| // It's safe to delete this block once we drop support for RN 0.76 |
There was a problem hiding this comment.
I think this is the moment (in another PR).
There was a problem hiding this comment.
Yes, I didn't want to make those changes here, but it is definitely right time to do this!
| } | ||
|
|
||
| defaultConfig { | ||
| minSdk = safeExtGet("minSdkVersion", 21) as Int |
There was a problem hiding this comment.
We also should be able to default to 24 - https://github.com/react-native-community/template/blob/8e6fc9056b491d0a7229286dafdbd3327881f1c9/template/android/build.gradle#L4 (in another PR)
|
|
||
| plugins { | ||
| id("com.android.library") version "8.5.0" | ||
| id("org.jetbrains.kotlin.android") version "2.0.21" |
There was a problem hiding this comment.
Shouldn't that be read from the apps config first?
|
|
||
| plugins { | ||
| id("com.android.library") version "8.5.0" | ||
| id("org.jetbrains.kotlin.android") version "2.0.21" |
There was a problem hiding this comment.
Also, assuming this corresponds to the buildscript block, don't we need spotless here?
| } | ||
|
|
||
| include("lib") | ||
| project(":lib").projectDir.mkdirs() No newline at end of file |
|
Suppressed by #3544 |
>[!IMPORTANT] > Replaces #3538 ## Description Seems like we fallen behind with our build tools dependencies. This PR: - Bumps `Kotlin` version to 2.0.21 - Updates `gradle` - Removes build warnings - Removes sourceSets for unsupported versions of RN ## Test plan - Run `yarn android` in `basic-example` and `expo-example` - Run `yarn format:android`
Caution
Suppressed by #3544
Description
Seems like we fallen behind with our build tools dependencies. This PR:
Kotlinversion to 2.0.21KotlingradleWarning
Looks like
spotlessis a bit picky when it comes toKotlinscripts, so I had to move it tobuild.gradle.ktsTest plan
yarn androidinbasic-exampleandexpo-example(build apps with--warning-mode all)yarn format:android