-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
1 parent
94aba65
commit 6aa98ed
Showing
37 changed files
with
483 additions
and
567 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<component name="CopyrightManager"> | ||
<copyright> | ||
<option name="notice" value="Copyright (C) 2019-&#36;today.year C4 &#36;project.name is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. &#36;project.name is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU General Public License and the GNU Lesser General Public License along with &#36;project.name. If not, see <https://www.gnu.org/licenses/>." /> | ||
<option name="myName" value="LGPL-3.0-or-later" /> | ||
</copyright> | ||
</component> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
id 'groovy-gradle-plugin' | ||
} |
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,117 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'maven-publish' | ||
} | ||
|
||
base { | ||
archivesName = "${mod_id}-${project.name}" | ||
} | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(java_version) | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
// https://docs.gradle.org/current/userguide/declaring_repositories.html#declaring_content_exclusively_found_in_one_repository | ||
exclusiveContent { | ||
forRepository { | ||
maven { | ||
name = 'Sponge' | ||
url = 'https://repo.spongepowered.org/repository/maven-public' | ||
} | ||
} | ||
filter { includeGroupAndSubgroups("org.spongepowered") } | ||
} | ||
maven { | ||
name = 'Illusive Soulworks' | ||
url = 'https://maven.theillusivec4.top' | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation 'org.jetbrains:annotations:24.1.0' | ||
} | ||
|
||
// Declare capabilities on the outgoing configurations. | ||
// Read more about capabilities here: https://docs.gradle.org/current/userguide/component_capabilities.html#sec:declaring-additional-capabilities-for-a-local-component | ||
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant -> | ||
configurations."$variant".outgoing { | ||
capability("$group:$mod_id-${project.name}-${minecraft_version}:$version") | ||
capability("$group:$mod_id:$version") | ||
} | ||
publishing.publications.configureEach { | ||
suppressPomMetadataWarningsFor(variant) | ||
} | ||
} | ||
|
||
sourcesJar { | ||
from(rootProject.file("LICENSE")) | ||
from(rootProject.file("COPYING")) | ||
from(rootProject.file("COPYING.LESSER")) | ||
from(rootProject.file("README.md")) | ||
from(rootProject.file("CHANGELOG.md")) | ||
} | ||
|
||
jar { | ||
from(rootProject.file("LICENSE")) | ||
from(rootProject.file("COPYING")) | ||
from(rootProject.file("COPYING.LESSER")) | ||
from(rootProject.file("README.md")) | ||
from(rootProject.file("CHANGELOG.md")) | ||
|
||
manifest { | ||
attributes([ | ||
'Specification-Title' : mod_name, | ||
'Specification-Vendor' : mod_author, | ||
'Specification-Version' : project.jar.archiveVersion, | ||
'Implementation-Title' : project.name, | ||
'Implementation-Version': project.jar.archiveVersion, | ||
'Implementation-Vendor' : mod_author, | ||
'Built-On-Minecraft' : minecraft_version | ||
]) | ||
} | ||
} | ||
|
||
processResources { | ||
def expandProps = [ | ||
"version" : version, | ||
"group" : project.group, //Else we target the task's group. | ||
"minecraft_version" : minecraft_version, | ||
"forge_version" : forge_version, | ||
"forge_version_range" : forge_version_range, | ||
"minecraft_version_range" : minecraft_version_range, | ||
"minecraft_version_range_alt": minecraft_version_range_alt, | ||
"mod_name" : mod_name, | ||
"mod_author" : mod_author, | ||
"mod_id" : mod_id, | ||
"license" : license, | ||
"issues_url" : issues_url, | ||
"sources_url" : sources_url, | ||
"description" : project.description, | ||
"neoforge_version" : neoforge_version, | ||
"neoforge_version_range" : neoforge_version_range, | ||
"java_version" : java_version | ||
] | ||
|
||
filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', 'META-INF/neoforge.mods.toml', '*.mixins.json']) { | ||
expand expandProps | ||
} | ||
inputs.properties(expandProps) | ||
} | ||
|
||
publishing { | ||
publications { | ||
register('mavenJava', MavenPublication) { | ||
artifactId base.archivesName.get() | ||
from components.java | ||
} | ||
} | ||
repositories { | ||
maven { | ||
url System.getenv("local_maven_url") | ||
} | ||
} | ||
} |
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,44 @@ | ||
plugins { | ||
id 'multiloader-common' | ||
} | ||
|
||
configurations { | ||
commonJava{ | ||
canBeResolved = true | ||
} | ||
commonResources{ | ||
canBeResolved = true | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly(project(':common')) { | ||
capabilities { | ||
requireCapability "$group:$mod_id" | ||
} | ||
} | ||
commonJava project(path: ':common', configuration: 'commonJava') | ||
commonResources project(path: ':common', configuration: 'commonResources') | ||
} | ||
|
||
tasks.named('compileJava', JavaCompile) { | ||
dependsOn(configurations.commonJava) | ||
source(configurations.commonJava) | ||
} | ||
|
||
processResources { | ||
dependsOn(configurations.commonResources) | ||
from(configurations.commonResources) | ||
} | ||
|
||
tasks.named('javadoc', Javadoc).configure { | ||
dependsOn(configurations.commonJava) | ||
source(configurations.commonJava) | ||
} | ||
|
||
tasks.named("sourcesJar", Jar) { | ||
dependsOn(configurations.commonJava) | ||
from(configurations.commonJava) | ||
dependsOn(configurations.commonResources) | ||
from(configurations.commonResources) | ||
} |
Oops, something went wrong.