Skip to content

Commit

Permalink
bump build bits, write out a module descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
zml2008 committed Oct 17, 2022
1 parent 3ddd834 commit af0616f
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ on:

jobs:
call-check:
uses: SpongePowered/.github/.github/workflows/shared-check-license.yaml@master
uses: SpongePowered/.github/.github/workflows/shared-check-spotless.yaml@master
with:
runtime_version: 17
secrets: inherit
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ on:
jobs:
call-build:
uses: SpongePowered/.github/.github/workflows/shared-ci.yaml@master
with:
runtime_version: 17
secrets: inherit
2 changes: 2 additions & 0 deletions .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ on:
jobs:
call-analyze:
uses: SpongePowered/.github/.github/workflows/shared-codeql-analysis.yaml@master
with:
runtime_version: 17
secrets: inherit
43 changes: 35 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("org.spongepowered.gradle.sponge.dev") version "2.0.2"
id("net.kyori.indra.publishing.sonatype") version "2.1.1"
id("net.kyori.indra.crossdoc") version "2.1.1"
id("org.spongepowered.gradle.sponge.dev") version "2.1.1"
id("net.kyori.indra.publishing.sonatype") version "3.0.1"
id("net.kyori.indra.crossdoc") version "3.0.1"
}

defaultTasks("build")
Expand All @@ -14,6 +14,13 @@ repositories {

val specVersion: String by project
tasks {
val version = project.version.toString()
withType(JavaCompile::class).configureEach {
doFirst {
options.compilerArgs.addAll(listOf("--module-path", classpath.asPath, "--module-version", version))
}
}

jar {
manifest {
attributes(mapOf(
Expand All @@ -28,13 +35,19 @@ tasks {

javadoc {
options {
isFailOnError = false
(this as StandardJavadocDocletOptions).apply {
links(
"https://logging.apache.org/log4j/log4j-2.8.1/log4j-api/apidocs/"
"https://logging.apache.org/log4j/log4j-2.17.0/log4j-api/apidocs/",
"https://checkerframework.org/api/",
"https://maven.apache.org/ref/3.8.6/maven-artifact/apidocs",
"https://jd.spongepowered.org/plugin-meta/0.8.1/"
)
}
}

doFirst {
options.modulePath(classpath.toList())
}
}
}

Expand All @@ -53,15 +66,29 @@ spongeConvention {
}
}

indra {
javaVersions().minimumToolchain(17)
}

indraCrossdoc {
baseUrl(providers.gradleProperty("javadocPublishRoot"))
}

sourceSets {
main {
multirelease {
moduleName("org.spongepowered.plugin.spi")
alternateVersions(9)
applyToJavadoc(true)
}
}
}

dependencies {
api("org.spongepowered:plugin-meta:0.8.0")
api("org.spongepowered:plugin-meta:0.8.1")
api("org.apache.maven:maven-artifact:3.8.6")
api("org.apache.logging.log4j:log4j-api:2.8.1")
compileOnlyApi("org.checkerframework:checker-qual:3.23.0")
api("org.apache.logging.log4j:log4j-api:2.17.0")
compileOnlyApi("org.checkerframework:checker-qual:3.26.0")
}


2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ public StandardEnvironment(final Logger logger) {
this.blackboard = new StandardBlackboard();
}

@Override
public Logger logger() {
return this.logger;
}

@Override
public Blackboard blackboard() {
return this.blackboard;
}
Expand Down
10 changes: 10 additions & 0 deletions src/main/java9/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module org.spongepowered.plugin.spi {
exports org.spongepowered.plugin;
exports org.spongepowered.plugin.blackboard;
exports org.spongepowered.plugin.builtin;
exports org.spongepowered.plugin.builtin.jvm;
exports org.spongepowered.plugin.builtin.jvm.locator;

requires transitive org.spongepowered.plugin.metadata;
requires transitive org.apache.logging.log4j;
}

0 comments on commit af0616f

Please sign in to comment.