Skip to content

Commit d74b2de

Browse files
committed
feat(build-tools): added java docs
1 parent ee911d6 commit d74b2de

File tree

4 files changed

+22
-27
lines changed

4 files changed

+22
-27
lines changed

plugin/src/main/kotlin/com/undefinedcreations/echo/dependency/BuildToolsManager.kt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ object BuildToolsManager {
1919
private val buildToolsVersionFile = File(echoFolder, "buildToolsVersion.json")
2020
private val buildToolsJAR = File(echoFolder, "BuildTools.jar")
2121

22+
/**
23+
* Create the cache folder
24+
*/
2225
fun createUndefinedFolder() { echoFolder.mkdirs() }
2326

27+
/**
28+
* This method will check the local build tools version and update if needed
29+
*/
2430
fun checkBuildToolsAndInstall() {
2531
val lastVersion = getLastBuildToolsVersionInfo()
2632
if (getLocalBuildToolsVersion() < lastVersion.version) {
@@ -31,7 +37,15 @@ object BuildToolsManager {
3137
}
3238
}
3339

34-
40+
/**
41+
* This method will run build tools at a set minecraft version
42+
*
43+
* @param version the minecraft version that needs to be build
44+
* @param remapped if it should build the mojang mappings
45+
* @param generateSource if it should build the sources
46+
* @param generateDocs if it should build the docs with the jar. This is only the craftbukkit docs
47+
* @param printDebug if it should print out the jar debug info
48+
*/
3549
@Suppress("NAME_SHADOWING")
3650
fun buildBuildTools(
3751
version: String,

plugin/src/main/kotlin/com/undefinedcreations/echo/dependency/JavaVersions.kt

Lines changed: 0 additions & 26 deletions
This file was deleted.

plugin/src/main/kotlin/com/undefinedcreations/echo/dependency/RemapDependenciesExtension.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import org.gradle.api.artifacts.dsl.DependencyHandler
66
abstract class RemapDependenciesExtension(
77
private val dependencies: DependencyHandler
88
) {
9+
/**
10+
* This method will build tools of the select minecraft version with the correct options.
11+
* Next it will add the build tools that was build as a dependency.
12+
*/
913
operator fun invoke(
1014
minecraftVersion: String,
1115
mojangMapping: Boolean = true,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
package com.undefinedcreations.echo.exceptions
22

3+
/**
4+
* This exception will be throw then the system doesn't have the correct version of java installed.
5+
*/
36
class UnsupportedJavaVersion(version: Int): Exception("Can't find the correct version for build tools ($version)") {
47
}

0 commit comments

Comments
 (0)