Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Commit

Permalink
release: 0.3.1 Apparently the main sourceset is off limits when depen…
Browse files Browse the repository at this point in the history
…ding on tests
  • Loading branch information
alexstaeding committed May 19, 2021
1 parent 823e47b commit 6f55880
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "org.jagrkt"
version = "0.3.0"
version = "0.3.1"

repositories {
mavenCentral()
Expand Down
9 changes: 7 additions & 2 deletions src/main/kotlin/org/jagrkt/submitter/PrepareSubmissionTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ import org.gradle.kotlin.dsl.named
import org.gradle.kotlin.dsl.withType

internal fun Project.createPrepareSubmissionTask(configuration: SubmitConfigurationImpl) {

val mainResourcesFile = project.buildDir.resolve("resources/submit")
val submissionInfoFile = mainResourcesFile.resolve("submission-info.json")
val testMetaFile = mainResourcesFile.resolve("meta-meta.json")

tasks.create<Jar>("prepareSubmission") {
if (configuration.requireTests) {
dependsOn(tasks.withType<Test>())
Expand Down Expand Up @@ -69,7 +74,7 @@ $errors
with(configuration) {
archiveFileName.set("$assignmentId-$lastName-$firstName-submission.jar")
}
project.buildDir.resolve("resources/main/submission-info.json").apply {
submissionInfoFile.apply {
parentFile.mkdirs()
writeText(Json.encodeToString(configuration))
from(path)
Expand All @@ -88,7 +93,7 @@ $errors
val testMeta = buildJsonObject {
put("testClasses", testClasses)
}
project.buildDir.resolve("resources/main/test-meta.json").apply {
testMetaFile.apply {
parentFile.mkdirs()
writeText(testMeta.toString())
from(path)
Expand Down

0 comments on commit 6f55880

Please sign in to comment.