Skip to content

Commit

Permalink
Cleanup build files
Browse files Browse the repository at this point in the history
  • Loading branch information
DLochmelis33 committed Apr 14, 2024
1 parent 6121e67 commit 8f215a2
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 41 deletions.
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ repositories {
}

subprojects {
group = "org.jetbrains.litmuskt"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
gradlePluginPortal()
Expand Down
1 change: 0 additions & 1 deletion cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ kotlin {
}
jvm {
withJava()
jvmToolchain(8)
}

sourceSets {
Expand Down
18 changes: 3 additions & 15 deletions codegen/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
plugins {
kotlin("multiplatform")
kotlin("jvm")
}

group = "org.jetbrains.litmuskt"
version = "1.0-SNAPSHOT"

kotlin {
jvm()
sourceSets {
jvmMain {
dependencies {
implementation("com.google.devtools.ksp:symbol-processing-api:1.9.10-1.0.13")
}
kotlin.srcDir("src/main/kotlin")
resources.srcDir("src/main/resources")
}
}
dependencies {
implementation("com.google.devtools.ksp:symbol-processing-api:1.9.10-1.0.13")
}
15 changes: 3 additions & 12 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ plugins {
`java-library`
}

group = "org.jetbrains.litmuskt"
version = "1.0-SNAPSHOT"

kotlin {
val nativeTargets = listOf(
linuxX64(),
Expand All @@ -17,7 +14,7 @@ kotlin {

jvm {
withJava()
jvmToolchain(8)
jvmToolchain(17)
}

val hostOs = System.getProperty("os.name")
Expand All @@ -26,12 +23,12 @@ kotlin {
target.apply {
compilations.getByName("main") {
cinterops {
val barrier by creating {
create("barrier") {
defFile(project.file("src/nativeInterop/barrier.def"))
headers(project.file("src/nativeInterop/barrier.h"))
}
if (affinitySupported) {
val affinity by creating {
create("affinity") {
defFile(project.file("src/nativeInterop/kaffinity.def"))
compilerOpts.add("-D_GNU_SOURCE")
}
Expand All @@ -46,11 +43,5 @@ kotlin {
implementation(kotlin("test"))
}
}

jvmMain {
dependencies {
implementation(kotlin("reflect"))
}
}
}
}
22 changes: 11 additions & 11 deletions jcstress-wrapper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,30 @@ application {
mainClass = "MainKt"
}

kotlin {
jvmToolchain(8)
}

dependencies {
implementation(project(":core"))
implementation(project(":testsuite"))
implementation(kotlin("reflect"))
}

val jcsDir: File get() = File(System.getenv("JCS_DIR") ?: error("JCS_DIR envvar is not set"))
val jcsDir = rootProject.layout.projectDirectory.dir("jcstress")

tasks.register<Copy>("copyCoreToJCStress") {
dependsOn(":core:jvmJar")
from(project(":core").layout.buildDirectory.file("libs/core-jvm-1.0-SNAPSHOT.jar"))
if (inputs.sourceFiles.isEmpty) throw BuildCancelledException("missing files to copy")
from(project(":core").layout.buildDirectory.file("libs/core-jvm-$version.jar"))
rename { "litmusktJvm-1.0.jar" }
into(jcsDir.resolve("libs/org/jetbrains/litmuskt/litmusktJvm/1.0/"))
into(jcsDir.dir("libs/org/jetbrains/litmuskt/litmusktJvm/1.0/"))
doFirst {
if (inputs.sourceFiles.isEmpty) throw GradleException("missing files to copy")
}
}

tasks.register<Copy>("copyTestsuiteToJCStress") {
dependsOn(":testsuite:jvmJar")
from(project(":testsuite").layout.buildDirectory.file("libs/testsuite-jvm.jar"))
if (inputs.sourceFiles.isEmpty) throw BuildCancelledException("missing files to copy")
from(project(":testsuite").layout.buildDirectory.file("libs/testsuite-jvm-$version.jar"))
rename { "litmusktJvmTestsuite-1.0.jar" }
into(jcsDir.resolve("libs/org/jetbrains/litmuskt/litmusktJvmTestsuite/1.0/"))
into(jcsDir.dir("libs/org/jetbrains/litmuskt/litmusktJvmTestsuite/1.0/"))
doFirst {
if (inputs.sourceFiles.isEmpty) throw GradleException("missing files to copy")
}
}
2 changes: 1 addition & 1 deletion jcstress/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<!--
Java source/target to use for compilation.
-->
<javac.target>1.8</javac.target>
<javac.target>17</javac.target>

<!--
Name of the test Uber-JAR to generate.
Expand Down
1 change: 0 additions & 1 deletion testsuite/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ kotlin {
macosArm64()
jvm {
withJava()
jvmToolchain(8)
}

sourceSets {
Expand Down

0 comments on commit 8f215a2

Please sign in to comment.