-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Resources gradle plugin #3961
Resources gradle plugin #3961
Conversation
I don't know why, but CI fails. Error: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type safe resource classes looks good!
|
||
internal fun Resource.getPathByEnvironment(): String { | ||
//TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What this TODO means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here will be a logic how to select a concrete file by an environment and qualifiers
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesGenerator.kt
Outdated
Show resolved
Hide resolved
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesGenerator.kt
Outdated
Show resolved
Hide resolved
dda0451
to
54f2c05
Compare
👆 just rebased on the latest master |
components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/Resource.kt
Show resolved
Hide resolved
...ts/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/ImageResources.kt
Show resolved
Hide resolved
...s/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringResources.kt
Show resolved
Hide resolved
...ts/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/ImageResources.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/org/jetbrains/compose/desktop/application/internal/ComposeProjectProperties.kt
Outdated
Show resolved
Hide resolved
val dirs = rootResDir.listFiles { f -> f.isDirectory }.orEmpty() | ||
|
||
//type -> id -> resource item | ||
val resources: Map<ResourceType, Map<String, List<ResourceItem>>> = dirs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add some unit-tests for this logic
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesGenerator.kt
Outdated
Show resolved
Hide resolved
And generate code only if there is a dependency on the resources library
…ources in the demo app
…esources.always.generate.accessors'.
…dle compilation warning
a510f07
to
7caa3c2
Compare
d2151d4
to
97c26c0
Compare
gradle-plugins/compose/src/test/test-projects/misc/commonResources/expected/Res.kt
Show resolved
Hide resolved
b96d5e0
to
f9e7341
Compare
f9e7341
to
835bd7a
Compare
No description provided.