Skip to content

Commit

Permalink
The big refactor — part 4: Marie Kondo edition (#198)
Browse files Browse the repository at this point in the history
* Move core components to core.component package

Includes moving their styling to a subpackage

* Move state to core.state package

* Move other bits to core and foundation packages

* Move basic theme stuff to foundation package

The foundation package doesn't depend on core anymore!

* Rename core package to ui

* Remove int-ui-core module

Its few files have been moved to ui and intui-standalone

* Rename core module to ui

* Split foundation module out of ui module

* Add missing foundation.api file

* Remove unnecessary FQNs
  • Loading branch information
rock3r committed Oct 23, 2023
1 parent 009a0b8 commit beb0c16
Show file tree
Hide file tree
Showing 222 changed files with 4,785 additions and 4,598 deletions.
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ plugins {
}

dependencies {
sarif(projects.core)
sarif(projects.ui)
sarif(projects.samples.standalone)
sarif(projects.intUi.intUiStandalone)
sarif(projects.intUi.intUiDecoratedWindow)
sarif(projects.intUi.intUiCore)
sarif(projects.ideLafBridge)
sarif(projects.ideLafBridge.ideLafBridge232)
sarif(projects.ideLafBridge.ideLafBridge233)
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/MergeSarifTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ open class MergeSarifTask : SourceTask() {
.values
.asSequence()
.filter { it.isNotEmpty() }
.map { it.first().copy(results = it.flatMap { it.results ?: emptyList() }) }
.map { run -> run.first().copy(results = run.flatMap { it.results ?: emptyList() }) }
.toList()
)
logger.lifecycle("Merged SARIF file contains ${merged.runs.size} run(s)")
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/jewel-check-public-api.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apiValidation {
}

poko {
pokoAnnotation.set("org.jetbrains.jewel.GenerateDataFunctions")
pokoAnnotation.set("org.jetbrains.jewel.foundation.GenerateDataFunctions")
}

tasks {
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/jewel.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ detekt {
buildUponDefaultConfig = true
}

val sarifReport = layout.buildDirectory.file("reports/ktlint-${project.name}.sarif")
val sarifReport: Provider<RegularFile> = layout.buildDirectory
.file("reports/ktlint-${project.name}.sarif")

tasks {
detektMain {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal object IntUiThemeDescriptorReader {
addImport(colorClassName.packageName, colorClassName.simpleName)

addType(TypeSpec.objectBuilder(className).apply {
addSuperinterface(ClassName.bestGuess("org.jetbrains.jewel.ThemeDescriptor"))
addSuperinterface(ClassName.bestGuess("org.jetbrains.jewel.foundation.theme.ThemeDescriptor"))

addProperty(
PropertySpec.builder("isDark", Boolean::class, KModifier.OVERRIDE)
Expand All @@ -52,9 +52,9 @@ internal object IntUiThemeDescriptorReader {
}.build()

private val colorPaletteClassName =
ClassName.bestGuess("org.jetbrains.jewel.ThemeColorPalette")
ClassName.bestGuess("org.jetbrains.jewel.foundation.theme.ThemeColorPalette")
private val iconDataClassName =
ClassName.bestGuess("org.jetbrains.jewel.ThemeIconData")
ClassName.bestGuess("org.jetbrains.jewel.foundation.theme.ThemeIconData")

private fun TypeSpec.Builder.readColors(colors: Map<String, String>) {
val colorGroups = colors.entries.groupBy {
Expand Down
3,060 changes: 0 additions & 3,060 deletions core/api/core.api

This file was deleted.

This file was deleted.

102 changes: 0 additions & 102 deletions core/src/main/kotlin/org/jetbrains/jewel/ComponentStyling.kt

This file was deleted.

Loading

0 comments on commit beb0c16

Please sign in to comment.