-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
174 additions
and
127 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2021 The Terasology Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
apply(from = "$rootDir/gradle/common.gradle.kts") | ||
|
||
plugins { | ||
`java-library` | ||
} | ||
|
||
tasks.register<Copy>("gatherJarModules") { | ||
dependsOn( | ||
":testpack:moduleA:jar", | ||
":testpack:moduleB:jar", | ||
":testpack:moduleC:jar", | ||
":testpack:moduleD:jar" | ||
) | ||
|
||
from("../testpack/moduleA/build/libs/") | ||
from("../testpack/moduleB/build/libs/") | ||
from("../testpack/moduleC/build/libs/") | ||
from("../testpack/moduleD/build/libs/") | ||
from("../testpack/moduleF/build/libs/") | ||
into("test-modules") | ||
include("*.jar") | ||
} | ||
|
||
// Primary dependencies definition | ||
dependencies { | ||
testAnnotationProcessor(project(":gestalt-inject-java")) | ||
|
||
implementation(libs.slf4j.api) | ||
implementation(libs.guava) | ||
api(project(":gestalt-inject")) | ||
|
||
testImplementation(libs.junit) | ||
testImplementation(libs.logback) | ||
testImplementation(libs.mockito) | ||
|
||
testImplementation(project(":gestalt-module")) | ||
testImplementation(project(":testpack:testpack-api")) | ||
testImplementation(project(":gestalt-entity-system")) | ||
} | ||
|
||
tasks.named("test") { | ||
dependsOn("gatherJarModules") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
gestalt-inject/build.gradle → gestalt-inject/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
// Copyright 2021 The Terasology Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
apply(from: "$rootDir/gradle/common.gradle.kts") | ||
apply(from = "$rootDir/gradle/common.gradle.kts") | ||
|
||
plugins { | ||
`java-library` | ||
} | ||
|
||
// Primary dependencies definition | ||
dependencies { | ||
api(group: 'javax.inject', name: 'javax.inject', version: '1') | ||
api("javax.inject:javax.inject:1") | ||
implementation(libs.slf4j.api) | ||
implementation(libs.guava) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// Copyright 2021 The Terasology Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
apply(from = "$rootDir/gradle/common.gradle.kts") | ||
|
||
plugins { | ||
`java-library` | ||
} | ||
|
||
dependencies { | ||
implementation("org.javassist:javassist:3.27.0-GA") // TODO: REMOVE this. Replace with gestalt's DI generator (used by ByteCodeInjector) | ||
|
||
api(project(":gestalt-di")) | ||
|
||
implementation(project(":gestalt-util")) | ||
annotationProcessor(project(":gestalt-inject-java")) | ||
|
||
implementation(libs.guava) | ||
implementation(libs.gson) | ||
implementation("org.apache.commons:commons-vfs2:2.2") | ||
implementation(libs.slf4j.api) | ||
implementation(libs.android.annotation) | ||
implementation("com.github.zafarkhaja:java-semver:0.10.2") | ||
|
||
testImplementation(project(":testpack:testpack-api")) | ||
testAnnotationProcessor(project(":gestalt-inject-java")) | ||
testImplementation(libs.junit) | ||
testImplementation(libs.logback) | ||
testImplementation(libs.mockito) | ||
} | ||
|
||
// Configure Java compilation options | ||
tasks.named<JavaCompile>("compileJava") { | ||
inputs.files(sourceSets.main.get().resources.srcDirs) | ||
options.compilerArgs.add("-Aresource=${sourceSets.main.get().resources.srcDirs.joinToString(File.pathSeparator)}") | ||
} | ||
|
||
tasks.named<JavaCompile>("compileTestJava") { | ||
inputs.files(sourceSets.test.get().resources.srcDirs) | ||
options.compilerArgs.add("-Aresource=${sourceSets.test.get().resources.srcDirs.joinToString(File.pathSeparator)}") | ||
} | ||
|
||
// Library and distribution config | ||
description = "Provides support for modules - java libraries that can be activated at runtime and run in a sandboxed environment" | ||
|
||
// Task registrations | ||
val gatherJarModules by tasks.registering(Copy::class) { | ||
dependsOn(":testpack:moduleA:jar", ":testpack:moduleB:jar", ":testpack:moduleC:jar", ":testpack:moduleD:jar") | ||
from("../testpack/moduleA/build/libs/") | ||
from("../testpack/moduleB/build/libs/") | ||
from("../testpack/moduleC/build/libs/") | ||
from("../testpack/moduleD/build/libs/") | ||
into("test-modules") | ||
include("*.jar") | ||
} | ||
|
||
val copyModuleELibs by tasks.registering(Copy::class) { | ||
dependsOn(":testpack:moduleA:jar", ":testpack:moduleD:jar") | ||
from("../testpack/moduleA/build/libs") | ||
from("../testpack/moduleD/build/libs") | ||
into("test-modules/moduleE/libs") | ||
include("*.jar") | ||
} | ||
|
||
val copyModuleEInfo by tasks.registering(Copy::class) { | ||
from("../testpack/moduleE") | ||
into("test-modules/moduleE") | ||
include("*.json") | ||
} | ||
|
||
val createModuleE by tasks.registering { | ||
dependsOn(":gestalt-module:copyModuleEInfo", ":gestalt-module:copyModuleELibs") | ||
} | ||
|
||
val gatherModules by tasks.registering { | ||
dependsOn(":gestalt-module:gatherJarModules", ":gestalt-module:createModuleE") | ||
} | ||
|
||
// Make the test task depend on gatherModules | ||
tasks.named("test") { | ||
dependsOn(gatherModules) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters