Skip to content

Commit

Permalink
Fixed gradle issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Pulverizer committed Oct 15, 2023
1 parent 21010fa commit dedc007
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 146 deletions.
6 changes: 5 additions & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 23 additions & 10 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 82 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
/*
* Copyright (c) 2018-2022 Hugo Dupanloup (Yeregorix)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import org.spongepowered.gradle.plugin.config.PluginLoaders
import org.spongepowered.plugin.metadata.model.PluginDependency

repositories {
gradlePluginPortal()
mavenCentral()
maven {
setUrl("https://repo.spongepowered.org/repository/maven-public/")
}
}

plugins {
id("io.github.pulverizer.movecraft.common_build")
id("org.spongepowered.gradle.vanilla")
id("org.spongepowered.gradle.plugin")
id("java-library")
id("com.github.johnrengelman.shadow") version "7.1.2"
id("org.spongepowered.gradle.plugin") version "2.2.0"
id("org.spongepowered.gradle.vanilla") version "0.2.1-SNAPSHOT"
}

sponge {
Expand Down Expand Up @@ -41,7 +55,54 @@ sponge {
}
}

//subprojects {
allprojects {
apply(plugin = "java-library")

group = "io.github.pulverizer"
version = "0.5-SNAPSHOT"

val javaTarget = 16
java {
sourceCompatibility = JavaVersion.toVersion(javaTarget)
targetCompatibility = JavaVersion.toVersion(javaTarget)
if (JavaVersion.current() < JavaVersion.toVersion(javaTarget)) {
toolchain.languageVersion.set(JavaLanguageVersion.of(javaTarget))
}
}

tasks.withType(JavaCompile::class).configureEach {
options.apply {
encoding = "utf-8" // Consistent source file encoding
release.set(javaTarget)
}
}

// Make sure all tasks which produce archives (jar, sources jar, javadoc jar, etc) produce more consistent output
tasks.withType(AbstractArchiveTask::class).configureEach {
isReproducibleFileOrder = true
isPreserveFileTimestamps = false
}

repositories {
gradlePluginPortal()
mavenCentral()
maven {
setUrl("https://repo.spongepowered.org/repository/maven-public/")
}
}

configurations.create("shade")
configurations.create("provided").extendsFrom(configurations.getByName("shade"))
configurations.implementation.extendsFrom(configurations.getByName("provided"))

tasks.jar {
setClassifier("base")
}
}

subprojects {
apply(plugin = "com.github.johnrengelman.shadow")

tasks.shadowJar {
setClassifier("shadow")
configurations = listOf(project.configurations.getByName("shade"))
Expand All @@ -63,7 +124,15 @@ sponge {
"shade"(project(path = ":")) { isTransitive = false }
"shade"(project(path = ":", configuration = "shade"))
}
//}
}

dependencies {
testCompileOnly(group = "org.junit.jupiter", name = "junit-jupiter", version = "5.7.0")
testCompileOnly(group = "org.mockito", name = "mockito-core", version = "3.+")
compileOnly("org.spongepowered:spongeapi:8.3.0-SNAPSHOT")
compileOnly("org.spongepowered:sponge:1.16.5-8.2.1-SNAPSHOT")
compileOnly("org.spongepowered:mixin:0.8.5")
}

minecraft {
version("1.16.5")
Expand Down
19 changes: 0 additions & 19 deletions buildSrc/build.gradle.kts

This file was deleted.

30 changes: 0 additions & 30 deletions buildSrc/settings.gradle

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions forge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@
* SOFTWARE.
*/

repositories {
gradlePluginPortal()
mavenCentral()
maven {
setUrl("https://repo.spongepowered.org/repository/maven-public/")
}
}

plugins {
id("io.github.pulverizer.movecraft.common_build")
id("net.smoofyuniverse.loom") version "0.12.0-SNAPSHOT"
}

Expand Down
12 changes: 0 additions & 12 deletions vanilla/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@
* SOFTWARE.
*/

repositories {
gradlePluginPortal()
mavenCentral()
maven {
setUrl("https://repo.spongepowered.org/repository/maven-public/")
}
}

plugins {
id("io.github.pulverizer.movecraft.common_build")
}

tasks.jar {
base.archivesBaseName = "Movecraft-vanilla"
}
Expand Down

0 comments on commit dedc007

Please sign in to comment.