Skip to content

Commit

Permalink
exclude build and output dirs in intellij
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Sep 20, 2024
1 parent cde3f26 commit d8ad227
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 16 deletions.
13 changes: 11 additions & 2 deletions Common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
java
id("idea")
id("java")
id("net.neoforged.moddev")
`maven-publish`
id("maven-publish")
}

// gradle.properties
Expand Down Expand Up @@ -121,3 +122,11 @@ publishing {
}
}
}

idea {
module {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
}
14 changes: 12 additions & 2 deletions CommonApi/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
java
id("idea")
id("java")
id("net.neoforged.moddev")
`maven-publish`
id("maven-publish")
}


Expand Down Expand Up @@ -70,3 +71,12 @@ publishing {
}
}
}

idea {
module {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
}

14 changes: 12 additions & 2 deletions Core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
java
`maven-publish`
id("idea")
id("java")
id("maven-publish")
}

repositories {
Expand Down Expand Up @@ -114,3 +115,12 @@ publishing {
}
}
}

idea {
module {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
}

6 changes: 2 additions & 4 deletions Fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ loom {
}

// loom 1.11 runDir takes a directory relative to the root directory
val loomRunDir = project.projectDir
.relativeTo(project.rootDir)
.resolve("run")
val loomRunDir = File("run")

named("client") {
client()
Expand Down Expand Up @@ -297,7 +295,7 @@ publishing {

idea {
module {
for (fileName in listOf("run", "out", "logs")) {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
Expand Down
8 changes: 8 additions & 0 deletions FabricApi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,11 @@ publishing {
}
}
}

idea {
module {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
}
3 changes: 2 additions & 1 deletion Forge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,12 @@ publishing {

idea {
module {
for (fileName in listOf("run", "out", "logs")) {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
}

// Required because FG, copied from the MDK
sourceSets.forEach {
val outputDir = layout.buildDirectory.file("sourcesSets/${it.name}").get().asFile
Expand Down
9 changes: 9 additions & 0 deletions ForgeApi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,12 @@ publishing {
tasks.withType<DownloadMavenArtifact> {
notCompatibleWithConfigurationCache("uses Task.project at execution time")
}


idea {
module {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
}
13 changes: 11 additions & 2 deletions Gui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
java
id("idea")
id("java")
id("net.neoforged.moddev")
`maven-publish`
id("maven-publish")
}

// gradle.properties
Expand Down Expand Up @@ -105,3 +106,11 @@ publishing {
}
}
}

idea {
module {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
}
15 changes: 13 additions & 2 deletions Library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
java
id("java")
id("idea")
id("eclipse")
id("maven-publish")
id("net.neoforged.moddev")
`maven-publish`
}

// gradle.properties
Expand Down Expand Up @@ -105,3 +107,12 @@ publishing {
}
}
}


idea {
module {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
}
2 changes: 1 addition & 1 deletion NeoForge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ publishing {

idea {
module {
for (fileName in listOf("run", "out", "logs")) {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
Expand Down
9 changes: 9 additions & 0 deletions NeoForgeApi/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id("idea")
id("java")
id("maven-publish")
id("net.neoforged.moddev")
Expand Down Expand Up @@ -98,3 +99,11 @@ publishing {
}
}
}

idea {
module {
for (fileName in listOf("build", "run", "out", "logs")) {
excludeDirs.add(file(fileName))
}
}
}

0 comments on commit d8ad227

Please sign in to comment.