mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 20:49:05 +00:00
generateTypeScriptDefinitions gradle task
This commit is contained in:
1 parent
f0ec2b0401
commit
274e96af03
2 files changed
+23
-3
No files matched your search
+14
-2
@@ -3,6 +3,7 @@
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhconvention'
|
||||
id 'idea'
|
||||
id "dts.typescript-generator"
|
||||
}
|
||||
|
||||
version = "1.10.3"
|
||||
@@ -41,5 +42,16 @@ sourceSets.main.java {
|
||||
srcDirs += apiDir
|
||||
}
|
||||
|
||||
// Modify the existing 'build' task to depend on 'updateAPI'
|
||||
//tasks.apiClasses.dependsOn 'updateAPI'
|
||||
// ============================================================================
|
||||
// TypeScript Definition Generation Task
|
||||
// Generates .d.ts files from Java API sources for scripting IDE support
|
||||
// ============================================================================
|
||||
// TypeScript plugin is applied above in the main plugins block
|
||||
|
||||
tasks.named("generateTypeScriptDefinitions").configure {
|
||||
sourceDirectories = ['src/api/java']
|
||||
outputDirectory = "src/main/resources/assets/${project.property("modId")}/api"
|
||||
apiPackages = ['noppes.npcs.api'] as Set
|
||||
cleanOutputFirst = true // Clean old generated files before regenerating
|
||||
}
|
||||
|
||||
+9
-1
@@ -1,6 +1,14 @@
|
||||
|
||||
pluginManagement {
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if(requested.id.toString() == "dts.typescript-generator") {
|
||||
useModule("com.github.bigguy345:dts-gradle-plugin:95b8ab4")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url "https://jitpack.io"}
|
||||
maven {
|
||||
// RetroFuturaGradle
|
||||
name "GTNH Maven"
|
||||
|
||||
Reference in new issue
Block a user