Skip to content

Commit

Permalink
Use kotlin.sourceSets for defining the project structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhdunn committed Nov 20, 2024
1 parent e8bb0d0 commit 418c7e7
Show file tree
Hide file tree
Showing 20 changed files with 148 additions and 71 deletions.
9 changes: 7 additions & 2 deletions src/intellij-test/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.test.java.srcDirs += "test"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
}

kotlin.sourceSets.test {
kotlin.srcDirs("test")
}

dependencies {
implementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
Expand Down
12 changes: 7 additions & 5 deletions src/kotlin-intellij/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
sourceSets.main.java.srcDirs += "main"

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
}

ext.compat_version = project.property("idea_since_build")
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

dependencies {
implementation(project(":src:intellij-compat"))
Expand Down
12 changes: 8 additions & 4 deletions src/lang-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

dependencies {
implementation(project(":src:kotlin-intellij"))
Expand Down
12 changes: 8 additions & 4 deletions src/lang-java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

dependencies {
intellijPlatform {
Expand Down
12 changes: 8 additions & 4 deletions src/lang-xdm/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

dependencies {
implementation(project(":src:kotlin-intellij"))
Expand Down
12 changes: 8 additions & 4 deletions src/lang-xpath/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

processResources {
from ("main") {
Expand Down
12 changes: 8 additions & 4 deletions src/lang-xpm/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

dependencies {
implementation(project(":src:kotlin-intellij"))
Expand Down
12 changes: 8 additions & 4 deletions src/lang-xproc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

dependencies {
implementation(project(":src:intellij-compat"))
Expand Down
10 changes: 7 additions & 3 deletions src/lang-xqdoc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
}

dependencies {
implementation(project(":src:kotlin-intellij"))
Expand Down
12 changes: 8 additions & 4 deletions src/lang-xquery/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

processResources {
from ("main") {
Expand Down
12 changes: 8 additions & 4 deletions src/lang-xslt/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

processResources {
from ("main") {
Expand Down
10 changes: 7 additions & 3 deletions src/plugin-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
}

dependencies {
implementation(project(":src:intellij-compat"))
Expand Down
10 changes: 7 additions & 3 deletions src/plugin-basex/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
}

dependencies {
implementation(project(":src:kotlin-intellij"))
Expand Down
10 changes: 7 additions & 3 deletions src/plugin-existdb/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
}

dependencies {
implementation(project(":src:kotlin-intellij"))
Expand Down
12 changes: 8 additions & 4 deletions src/plugin-expath/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

dependencies {
implementation(project(":src:kotlin-intellij"))
Expand Down
6 changes: 4 additions & 2 deletions src/plugin-exquery/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

dependencies {
implementation(project(":src:intellij-compat"))
Expand Down
12 changes: 8 additions & 4 deletions src/plugin-marklogic/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

dependencies {
intellijPlatform {
Expand Down
10 changes: 7 additions & 3 deletions src/plugin-saxon/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
}

dependencies {
implementation(project(":src:kotlin-intellij"))
Expand Down
12 changes: 8 additions & 4 deletions src/plugin-w3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
sourceSets.test.resources.srcDirs += "test/resources"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
resources.srcDirs("test/resources")
}

dependencies {
implementation(project(":src:kotlin-intellij"))
Expand Down
10 changes: 7 additions & 3 deletions src/plugin-xijp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
sourceSets.main.java.srcDirs += "main"
sourceSets.main.resources.srcDirs += "main/resources"
kotlin.sourceSets.main {
kotlin.srcDirs("main")
resources.srcDirs("main/resources")
}

sourceSets.test.java.srcDirs += "test"
kotlin.sourceSets.test {
kotlin.srcDirs("test")
}

dependencies {
implementation(project(":src:lang-xpath"))
Expand Down

0 comments on commit 418c7e7

Please sign in to comment.