diff --git a/.gitignore b/.gitignore index bcddafe..9691404 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ build/ # Ssg dirs bin dist + +*.jfr diff --git a/build.gradle b/build.gradle index a917c6f..09ac4ff 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.jessebrault.ssg' version '0.6.3' + id 'com.jessebrault.ssg' version '0.7.0-SNAPSHOT' id 'distribution' } @@ -24,8 +24,6 @@ sourceSets { dependencies { implementation 'org.apache.groovy:groovy:4.0.27' - implementation 'com.jessebrault.ssg:cli:0.6.3' - serverImplementation 'org.eclipse.jetty:jetty-server:12.0.9' serverImplementation 'info.picocli:picocli:4.7.6' serverRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl:2.23.1' diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c35211..f8e1ee3 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradlew b/gradlew index f5feea6..adff685 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -115,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -173,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -206,15 +203,14 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 9d21a21..c4bdd3a 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,10 @@ goto fail :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 %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/pages/groovy/com/jessebrault/site/composition/CompositionPageFactory.groovy b/pages/groovy/com/jessebrault/site/composition/CompositionPageFactory.groovy index e3457cc..505f447 100644 --- a/pages/groovy/com/jessebrault/site/composition/CompositionPageFactory.groovy +++ b/pages/groovy/com/jessebrault/site/composition/CompositionPageFactory.groovy @@ -1,5 +1,6 @@ package com.jessebrault.site.composition +import com.jessebrault.ssg.WvcCompilerFactory import com.jessebrault.ssg.page.Page import com.jessebrault.ssg.page.PageFactory import com.jessebrault.ssg.view.WvcCompiler @@ -16,11 +17,11 @@ class CompositionPageFactory implements PageFactory { CompositionPageFactory( RegistryObjectFactory objectFactory, CompositionContainer compositions, - WvcCompiler wvcCompiler + WvcCompilerFactory wvcCompilerFactory ) { this.objectFactory = objectFactory this.compositions = compositions - this.wvcCompiler = wvcCompiler + this.wvcCompiler = wvcCompilerFactory.getWvcCompiler() } @Override diff --git a/ssg/default.groovy b/ssg/default.groovy index 0b4316d..cac6cad 100644 --- a/ssg/default.groovy +++ b/ssg/default.groovy @@ -22,7 +22,7 @@ build { githubUrl = 'https://github.com/JesseBrault0709' openGraphFallbackImage = 'https://jessebrault.nyc3.cdn.digitaloceanspaces.com/images/portrait3.jpg' } - objectFactoryBuilder.configure { + objectFactory.configure { configureRegistry { bind(TitleMaker, toSelf()) bind(CompositionContainer, toSelf())