Skip to content

Commit

Permalink
force VS maven for dependencies, fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubydesic committed Nov 30, 2022
1 parent 7015e6e commit 971c32f
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
Expand Down
32 changes: 23 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,31 @@ subprojects {
}
}
}
maven {
name = "Jitpack"
url = "https://jitpack.io"
}
maven {
name = "ParchmentMC"
url = "https://maven.parchmentmc.org"
if (project.use_external_repositories != "true") {
maven {
name = "ParchmentMC"
url = "https://maven.parchmentmc.org"
}
maven { url = "https://cursemaven.com" }
maven { url = "https://maven.terraformersmc.com/releases/" }
maven {
name = 'Kotlin for Forge'
url = 'https://thedarkcolour.github.io/KotlinForForge/'
}
}
mavenLocal()
}

// Remove automatically added repos
if (project.use_external_repositories != "true") {
repositories.removeIf {
def url = it.url.toString()
url.contains("maven.minecraftforge.net") ||
url.contains("maven.fabricmc.net") ||
url.contains("maven.architectury.dev")
}
}

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
// The following line declares the mojmap mappings, you may use other mappings as well
Expand All @@ -85,8 +99,8 @@ subprojects {

// configure checkstyle
checkstyle {
// configure to use checkstyle v10.5.0
toolVersion "10.5.0"
// configure to use checkstyle v8.41
toolVersion "8.45.1"
// Gradle should fail builds on checkstyle errors (not warnings)
ignoreFailures = true
// Checkstyle config file is in .checkstyle/checkstyle.xml
Expand Down
4 changes: 0 additions & 4 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
repositories {
maven { url = "https://cursemaven.com" }
}

dependencies {
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
// We depend on fabric loader here to use the fabric @Environment annotations
Expand Down
7 changes: 0 additions & 7 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ loom {
accessWidenerPath = project(":common").loom.accessWidenerPath
}

repositories {
maven {
url = "https://maven.terraformersmc.com/releases/"
}
maven { url = "https://cursemaven.com" }
}

dependencies {
modImplementation("net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}")

Expand Down
9 changes: 0 additions & 9 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ configurations {
shadowCommon.extendsFrom core
}

repositories {
maven {
name = 'Kotlin for Forge'
url = 'https://thedarkcolour.github.io/KotlinForForge/'
}
maven { url = "https://cursemaven.com" }
mavenCentral()
}

ext.kotlin_version = '1.7.10'
ext.coroutines_version = '1.6.4'
ext.serialization_version = '1.3.3'
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ dependency_downloader_version=4.7
# Prevent kotlin from autoincluding stdlib as a dependency, which breaks
# gradle's composite builds (includeBuild) for some reason. We'll add it manually
kotlin.stdlib.default.dependency=false
# Enable if the VS maven is down or missing some dependency you want to add
use_external_repositories=false
# Left intentionally empty
vs_maven_url=
vs_maven_username=
Expand Down
27 changes: 23 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
maven {
name = "Valkyrien Skies Internal"

url = vs_maven_url ?: 'https://maven.valkyrienskies.org'

if (vs_maven_username && vs_maven_password) {
credentials {
username = getProperty('vs_maven_username')
password = getProperty('vs_maven_password')
}
}
}
if (use_external_repositories != "true") {
maven { url "https://maven.architectury.dev/" }
maven { url "https://maven.fabricmc.net/" }
}
}
}

dependencyResolutionManagement {
repositories {
mavenCentral()
maven {
Expand All @@ -13,10 +36,6 @@ pluginManagement {
}
}
}
maven { url "https://maven.architectury.dev/" }
maven { url "https://maven.fabricmc.net/" }
maven { url "https://maven.minecraftforge.net/" }
gradlePluginPortal()
}
}

Expand Down

0 comments on commit 971c32f

Please sign in to comment.