-
Notifications
You must be signed in to change notification settings - Fork 0
chore: AGP 9.0.0 마이그레이션 #264
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,36 +5,34 @@ import org.gradle.api.Project | |
| import org.gradle.kotlin.dsl.configure | ||
| import org.gradle.kotlin.dsl.dependencies | ||
| import org.gradle.kotlin.dsl.withType | ||
| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
| import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension | ||
| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
|
||
| internal fun Project.configureCompose( | ||
| extension: CommonExtension<*, *, *, *, *, *>, | ||
| ) { | ||
| internal fun Project.configureCompose(extension: CommonExtension) { | ||
| extension.apply { | ||
| dependencies { | ||
| implementation(platform(libs.androidx.compose.bom)) | ||
| implementation(libs.bundles.androidx.compose) | ||
| debugImplementation(libs.androidx.compose.ui.tooling) | ||
| } | ||
| } | ||
|
|
||
| configure<ComposeCompilerGradlePluginExtension> { | ||
| includeSourceInformation.set(true) | ||
| extensions.configure<ComposeCompilerGradlePluginExtension> { | ||
| includeSourceInformation.set(true) | ||
|
|
||
| metricsDestination.file("build/composeMetrics") | ||
| reportsDestination.file("build/composeReports") | ||
| metricsDestination.file("build/composeMetrics") | ||
| reportsDestination.file("build/composeReports") | ||
|
|
||
| stabilityConfigurationFiles.addAll( | ||
| project.rootProject.layout.projectDirectory.file("stability.config.conf"), | ||
| ) | ||
| } | ||
| stabilityConfigurationFiles.addAll( | ||
| project.rootProject.layout.projectDirectory.file("stability.config.conf"), | ||
| ) | ||
| } | ||
|
Comment on lines
+20
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: In the Compose compiler Gradle plugin DSL (
Sources: Citations:
🏁 Script executed: # First, let's read the full Compose.kt file to understand the context
fd "Compose.kt" --type f | head -5Repository: YAPP-Github/Reed-Android Length of output: 138 🏁 Script executed: # Search for any gradle property usage related to compose metrics
rg "enableComposeCompilerMetrics|enableComposeCompilerReports|metricsDestination|reportsDestination" --type kotlin -A 2 -B 2Repository: YAPP-Github/Reed-Android Length of output: 3039 🏁 Script executed: # Check for gradle.properties or similar configuration files
fd "gradle.properties|local.properties" --type fRepository: YAPP-Github/Reed-Android Length of output: 85 🏁 Script executed: cat -n build-logic/src/main/kotlin/com/ninecraft/booket/convention/Compose.ktRepository: YAPP-Github/Reed-Android Length of output: 2909 ComposeCompilerGradlePluginExtension의 DSL 설정과 compiler args의 불일치 수정 필요 현재 코드에서 DSL 설정을 gradle 속성에 따라 조건부로 적용하거나, 경로를 통일하는 것이 필요합니다. 조건부 설정 예시 extensions.configure<ComposeCompilerGradlePluginExtension> {
includeSourceInformation.set(true)
- metricsDestination.file("build/composeMetrics")
- reportsDestination.file("build/composeReports")
+ val enableMetrics = project.providers
+ .gradleProperty("enableComposeCompilerMetrics")
+ .orNull == "true"
+ if (enableMetrics) {
+ metricsDestination.file("build/composeMetrics")
+ }
+
+ val enableReports = project.providers
+ .gradleProperty("enableComposeCompilerReports")
+ .orNull == "true"
+ if (enableReports) {
+ reportsDestination.file("build/composeReports")
+ }
stabilityConfigurationFiles.addAll(
project.rootProject.layout.projectDirectory.file("stability.config.conf"),
)
}🤖 Prompt for AI Agents |
||
|
|
||
| tasks.withType<KotlinCompile>().configureEach { | ||
| compilerOptions { | ||
| freeCompilerArgs.addAll( | ||
| buildComposeMetricsParameters(), | ||
| ) | ||
| } | ||
| tasks.withType<KotlinCompile>().configureEach { | ||
| compilerOptions { | ||
| freeCompilerArgs.addAll( | ||
| buildComposeMetricsParameters(), | ||
| ) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ sealed class UiText { | |
| data class DirectString(val value: String) : UiText() | ||
|
|
||
| class StringResource( | ||
| @StringRes val resId: Int, | ||
| @param: StringRes val resId: Int, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This annotation is currently applied to the value parameter only, but in the future it will also be applied to field.
See https://youtrack.jetbrains.com/issue/KT-73255 for more details. Kotlin 2.2 버전 이상부터 @param: 을 붙혀주지 않으면 위와 같은 warning이 출력되어, 추가해줬는데 Compiler 옵션에서 이를 일괄 처리 or 비활성화 가능하나 당장은 명시적으로 붙혀줬습니다! reference) |
||
| vararg val args: Any, | ||
| ) : UiText() | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") | ||
|
|
||
| plugins { | ||
| alias(libs.plugins.booket.android.library) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") | ||
|
|
||
| import com.ninecraft.booket.convention.getLocalProperty | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") | ||
|
|
||
| import com.ninecraft.booket.convention.getLocalProperty | ||
|
|
||
| plugins { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") | ||
|
|
||
| import com.ninecraft.booket.convention.getLocalProperty | ||
|
|
||
| plugins { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") | ||
|
|
||
| plugins { | ||
| alias(libs.plugins.booket.android.feature) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") | ||
|
|
||
| import com.ninecraft.booket.convention.getLocalProperty | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") | ||
|
|
||
| plugins { | ||
| alias(libs.plugins.booket.android.feature) | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.