Use Composite Builds
ScriptCraft/pipeline/head There was a failure building this commit Details

This commit is contained in:
TheBrokenRail 2020-05-31 13:25:16 -04:00
parent 3bea7e841b
commit 0e3b0cbc87
98 changed files with 125 additions and 143 deletions

14
.gitignore vendored
View File

@ -18,17 +18,3 @@ classes/
bin/
.classpath
.project
# fabric
run/
remappedSrc/
src/main/c/build-*
src/main/c/quickjs
src/main/c/jni
scripts/jdk.tar.gz
scripts/jdk
scripts/quickjs.tar.xz

15
Jenkinsfile vendored
View File

@ -8,19 +8,24 @@ pipeline {
sh 'cd scripts; ./setup.sh'
}
}
stage('Build Plugin') {
steps {
sh 'cd plugin; ./gradlew clean publish'
}
}
stage('Build') {
steps {
sh './gradlew clean build typedoc eslint publish'
sh 'cd scriptcraft; ./gradlew clean build typedoc eslint publish'
}
post {
success {
archiveArtifacts artifacts: 'build/libs/*', fingerprint: true
archiveArtifacts artifacts: 'scriptcraft/build/libs/*', fingerprint: true
publishHTML target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: false,
reportDir: 'src/main/ts/build/typedoc',
reportDir: 'scriptcraft/src/main/ts/build/typedoc',
reportFiles: 'index.html',
reportName: 'TypeDoc'
]
@ -29,8 +34,8 @@ pipeline {
}
stage('Build Examples') {
steps {
sh 'cd examples/typescript; ./gradlew clean build'
sh 'cd examples/javascript; ./gradlew clean build'
sh 'cd examples/typescript; ./gradlew clean build --include-build ../scriptcraft'
sh 'cd examples/javascript; ./gradlew clean build --include-build ../scriptcraft'
}
post {
success {

View File

View File

@ -1 +1 @@
../../gradle
../../common/gradle

View File

@ -1 +1 @@
../../gradlew
../../common/gradlew

View File

@ -1 +0,0 @@
../../gradlew.bat

View File

@ -1 +0,0 @@
../../settings.gradle.kts

View File

@ -0,0 +1,13 @@
pluginManagement {
repositories {
jcenter()
maven {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
maven {
url = uri("https://maven.thebrokenrail.com/")
}
gradlePluginPortal()
}
}

View File

@ -1 +0,0 @@
../../../../../src/main/resources/assets

View File

@ -13,7 +13,6 @@
"issues": "https://gitea.thebrokenrail.com/TheBrokenRail/ScriptCraft/issues"
},
"license": "MIT",
"icon": "assets/scriptcraft/icon.png",
"environment": "*",
"entrypoints": {
"scriptcraft": [

View File

@ -1,6 +1,6 @@
plugins {
id("fabric-loom") version "0.2.7-SNAPSHOT"
id("typescript")
id("com.thebrokenrail.scriptcraft")
}
java {

View File

@ -1 +0,0 @@
../../buildSrc/

View File

@ -1 +1 @@
../../gradle
../../common/gradle

View File

@ -1 +1 @@
../../gradlew
../../common/gradlew

View File

@ -1 +0,0 @@
../../gradlew.bat

View File

@ -1 +0,0 @@
../../settings.gradle.kts

View File

@ -0,0 +1,10 @@
pluginManagement {
repositories {
jcenter()
maven {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
gradlePluginPortal()
}
}

View File

@ -1 +0,0 @@
../../../../../src/main/resources/assets

View File

@ -13,7 +13,6 @@
"issues": "https://gitea.thebrokenrail.com/TheBrokenRail/ScriptCraft/issues"
},
"license": "MIT",
"icon": "assets/scriptcraft/icon.png",
"environment": "*",
"entrypoints": {
"scriptcraft": [

View File

@ -1 +1 @@
../../../../../src/main/ts/tsconfig.json
../../../../../common/tsconfig.json

100
gradlew.bat vendored
View File

@ -1,100 +0,0 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

37
plugin/build.gradle.kts Normal file
View File

@ -0,0 +1,37 @@
repositories {
gradlePluginPortal()
jcenter()
}
plugins {
`kotlin-dsl`
`maven-publish`
}
group = "com.thebrokenrail"
base.archivesBaseName = "scriptcraft"
version = "1.0.0-SNAPSHOT"
gradlePlugin {
plugins {
register("scriptcraft-plugin") {
id = "${group}.${base.archivesBaseName}"
implementationClass = "ScriptCraftPlugin"
}
}
}
publishing {
project.afterEvaluate {
publications {
named<MavenPublication>("pluginMaven") {
artifactId = base.archivesBaseName
}
}
}
repositories {
maven {
url = uri("/data/maven")
}
}
}

1
plugin/gradle Symbolic link
View File

@ -0,0 +1 @@
../common/gradle

1
plugin/gradlew vendored Symbolic link
View File

@ -0,0 +1 @@
../common/gradlew

View File

@ -7,7 +7,7 @@ import org.gradle.kotlin.dsl.*
import java.io.File
import java.util.concurrent.Callable
class TypeScriptPlugin : Plugin<Project> {
class ScriptCraftPlugin : Plugin<Project> {
open class TypeScriptConfig(rootDir: File) {
var root: File = File(rootDir, "src/main/ts")
}

34
scriptcraft/.gitignore vendored Normal file
View File

@ -0,0 +1,34 @@
# gradle
.gradle/
build/
out/
classes/
# idea
.idea/
*.iml
*.ipr
*.iws
# vscode
.settings/
bin/
.classpath
.project
# fabric
run/
remappedSrc/
src/main/c/build-*
src/main/c/quickjs
src/main/c/jni
scripts/jdk.tar.gz
scripts/jdk
scripts/quickjs.tar.xz

View File

@ -1,7 +1,7 @@
plugins {
id("fabric-loom") version "0.2.7-SNAPSHOT"
id("jni")
id("typescript")
id("com.thebrokenrail.scriptcraft")
`maven-publish`
}
@ -28,13 +28,13 @@ jni {
addPlatform("windows-x86", ".dll")
}
tasks.register<TypeScriptPlugin.NPMTask>("eslint") {
tasks.register<ScriptCraftPlugin.NPMTask>("eslint") {
group = "verification"
taskName = "eslint"
}
tasks.register<TypeScriptPlugin.NPMTask>("typedoc") {
tasks.register<ScriptCraftPlugin.NPMTask>("typedoc") {
group = "documentation"
taskName = "typedoc"

View File

@ -12,9 +12,5 @@ gradlePlugin {
id = "jni"
implementationClass = "JNIPlugin"
}
register("typescript-plugin") {
id = "typescript"
implementationClass = "TypeScriptPlugin"
}
}
}

1
scriptcraft/gradle Symbolic link
View File

@ -0,0 +1 @@
../common/gradle

1
scriptcraft/gradlew vendored Symbolic link
View File

@ -0,0 +1 @@
../common/gradlew

View File

@ -5,8 +5,13 @@ pluginManagement {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
maven {
url = uri("https://maven.thebrokenrail.com/")
}
gradlePluginPortal()
}
}
rootProject.name = "ScriptCraft"
includeBuild("../plugin")

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1 @@
../../../../common/tsconfig.json