Skip to content

Commit

Permalink
Misc: Move example gui code into dedicated :example:common project
Browse files Browse the repository at this point in the history
  • Loading branch information
Johni0702 committed Aug 6, 2024
1 parent 1140bcb commit 78ad29f
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 5 deletions.
4 changes: 0 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,10 @@ tasks.processResources {
tasks.jar {
dependsOn(internal)
from({ internal.map { zipTree(it) } })

// TODO move into separate project
exclude("com") // `com.example` package
}

apiValidation {
ignoredProjects.addAll(subprojects.map { it.name })
ignoredPackages.add("com.example")
nonPublicMarkers.add("org.jetbrains.annotations.ApiStatus\$Internal")
}

Expand Down
2 changes: 1 addition & 1 deletion example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
exclude(group = "org.jetbrains.kotlin")
}

implementation(project(":"))
implementation(project(":example:common"))

if (platform.isFabric) {
val fabricApiVersion = when(platform.mcVersion) {
Expand Down
23 changes: 23 additions & 0 deletions example/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import gg.essential.gradle.multiversion.StripReferencesTransform.Companion.registerStripReferencesAttribute

plugins {
kotlin("jvm")
id("gg.essential.defaults")
}
repositories.mavenLocal()

kotlin.jvmToolchain(8)

val common = registerStripReferencesAttribute("common") {
excludes.add("net.minecraft")
}

dependencies {
api(libs.kotlin.stdlib.jdk8)

compileOnly(libs.versions.universalcraft.map { "gg.essential:universalcraft-1.8.9-forge:$it" }) {
attributes { attribute(common, true) }
}

api(project(":"))
}
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ include(":example")
project(":example").apply {
buildFileName = "root.gradle.kts"
}
include(":example:common")
listOf(
"1.8.9-forge",
"1.12.2-forge",
Expand Down

0 comments on commit 78ad29f

Please sign in to comment.