diff --git a/api/build.gradle b/api/build.gradle index 4dccdcb..c222a4c 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -8,7 +8,6 @@ plugins { repositories { mavenCentral() - mavenLocal() } configurations { @@ -20,7 +19,12 @@ configurations { dependencies { api libs.groovy api libs.groovy.yaml - api libs.groowt.all + + api libs.groowt.v + api libs.groowt.vc + api libs.groowt.wvc + api libs.groowt.fp + api libs.groowt.di compileOnlyApi libs.jetbrains.anontations @@ -29,7 +33,7 @@ dependencies { implementation libs.commonmark.frontmatter implementation libs.jsoup - runtimeOnly libs.groowt.wvcCompiler + runtimeOnly libs.groowt.wvcc } java { diff --git a/api/src/main/groovy/com/jessebrault/ssg/DefaultStaticSiteGenerator.groovy b/api/src/main/groovy/com/jessebrault/ssg/DefaultStaticSiteGenerator.groovy index cea7df3..f572aed 100644 --- a/api/src/main/groovy/com/jessebrault/ssg/DefaultStaticSiteGenerator.groovy +++ b/api/src/main/groovy/com/jessebrault/ssg/DefaultStaticSiteGenerator.groovy @@ -19,7 +19,6 @@ import groovy.transform.TupleConstructor import groowt.util.di.ObjectFactory import groowt.util.di.RegistryObjectFactory import groowt.util.fp.option.Option -import groowt.view.component.compiler.DefaultComponentTemplateCompilerConfiguration import groowt.view.component.compiler.SimpleComponentTemplateClassFactory import groowt.view.component.factory.ComponentFactories import groowt.view.component.web.DefaultWebViewComponentContext @@ -72,10 +71,7 @@ class DefaultStaticSiteGenerator implements StaticSiteGenerator { } protected WvcCompiler getWvcCompiler() { - def wvcCompilerConfiguration = new DefaultComponentTemplateCompilerConfiguration() - wvcCompilerConfiguration.groovyClassLoader = this.groovyClassLoader - def templateClassFactory = new SimpleComponentTemplateClassFactory(this.groovyClassLoader) - new WvcCompiler(wvcCompilerConfiguration, templateClassFactory) + new WvcCompiler(new SimpleComponentTemplateClassFactory(this.groovyClassLoader)) } protected WebViewComponentContext makeContext( diff --git a/api/src/main/groovy/com/jessebrault/ssg/view/WvcCompiler.groovy b/api/src/main/groovy/com/jessebrault/ssg/view/WvcCompiler.groovy index 532e69c..851f1b7 100644 --- a/api/src/main/groovy/com/jessebrault/ssg/view/WvcCompiler.groovy +++ b/api/src/main/groovy/com/jessebrault/ssg/view/WvcCompiler.groovy @@ -6,14 +6,12 @@ import groowt.util.fp.either.Either import groowt.view.component.ComponentTemplate import groowt.view.component.ViewComponent import groowt.view.component.compiler.ComponentTemplateClassFactory -import groowt.view.component.compiler.ComponentTemplateCompilerConfiguration import groowt.view.component.compiler.source.ComponentTemplateSource import groowt.view.component.web.compiler.DefaultWebViewComponentTemplateCompileUnit @TupleConstructor class WvcCompiler { - final ComponentTemplateCompilerConfiguration compilerConfiguration final ComponentTemplateClassFactory templateClassFactory Either compileTemplate( @@ -33,7 +31,7 @@ class WvcCompiler { source, componentClass.packageName ) - def compileResult = compileUnit.compile(compilerConfiguration) + def compileResult = compileUnit.compile() def templateClass = templateClassFactory.getTemplateClass(compileResult) def componentTemplate = templateClass.getConstructor().newInstance() return Either.right(componentTemplate) diff --git a/buildSrc/src/main/groovy/ssg-common.gradle b/buildSrc/src/main/groovy/ssg-common.gradle index db6d244..272dfd0 100644 --- a/buildSrc/src/main/groovy/ssg-common.gradle +++ b/buildSrc/src/main/groovy/ssg-common.gradle @@ -4,7 +4,7 @@ plugins { } group 'com.jessebrault.ssg' -version '0.4.2' +version '0.4.3' repositories { mavenCentral() diff --git a/cli/build.gradle b/cli/build.gradle index ad9f5e2..8ff2e59 100644 --- a/cli/build.gradle +++ b/cli/build.gradle @@ -8,7 +8,6 @@ plugins { repositories { mavenCentral() maven { url 'https://repo.gradle.org/gradle/libs-releases' } - mavenLocal() } dependencies { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index dc7bf8b..8248233 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] commonmark = '0.22.0' -groovy = '4.0.21' -groowt = '0.1.2' +groovy = '4.0.25' +groowt = '0.1.3' log4j2 = '2.23.1' mockito = '5.12.0' junit = '5.10.2' @@ -12,8 +12,12 @@ commonmark = { module = 'org.commonmark:commonmark', version.ref = 'commonmark' commonmark-frontmatter = { module = 'org.commonmark:commonmark-ext-yaml-front-matter', version.ref = 'commonmark' } groovy = { module = 'org.apache.groovy:groovy', version.ref = 'groovy' } groovy-yaml = { module = 'org.apache.groovy:groovy-yaml', version.ref = 'groovy' } -groowt-all = { module = 'groowt:groowt-all', version.ref = 'groowt' } -groowt-wvcCompiler = { module = 'groowt:web-view-components-compiler', version.ref = 'groowt' } +groowt-v = { module = 'groowt:views', version.ref = 'groowt' } +groowt-vc = { module = 'groowt:view-components', version.ref = 'groowt' } +groowt-wvc= { module = 'groowt:web-view-components', version.ref = 'groowt' } +groowt-wvcc = { module = 'groowt:web-view-components-compiler', version.ref = 'groowt' } +groowt-fp = { module = 'groowt:util-fp', version.ref = 'groowt' } +groowt-di = { module = 'groowt:util-di', version.ref = 'groowt' } jetbrains-anontations = 'org.jetbrains:annotations:24.1.0' jsoup = 'org.jsoup:jsoup:1.17.2' junit-jupiter-api = { module = 'org.junit.jupiter:junit-jupiter-api', version.ref = 'junit' } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c35211..a4b76b9 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 09523c0..e18bc25 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index f5feea6..f3b75f3 100755 --- a/gradlew +++ b/gradlew @@ -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 diff --git a/test-ssg-project/build.gradle b/test-ssg-project/build.gradle index 53e5f72..81774a7 100644 --- a/test-ssg-project/build.gradle +++ b/test-ssg-project/build.gradle @@ -1,19 +1,19 @@ plugins { - id 'com.jessebrault.ssg' version '0.4.2' + id 'com.jessebrault.ssg' } dependencies { - implementation 'org.apache.groovy:groovy:4.0.21' + implementation 'org.apache.groovy:groovy:4.0.25' } repositories { mavenCentral() - maven { - url 'https://archiva.jessebrault.com/repository/internal/' - - credentials { - username System.getenv('JBARCHIVA_USERNAME') - password System.getenv('JBARCHIVA_PASSWORD') - } - } +// maven { +// url 'https://archiva.jessebrault.com/repository/internal/' +// +// credentials { +// username System.getenv('JBARCHIVA_USERNAME') +// password System.getenv('JBARCHIVA_PASSWORD') +// } +// } } diff --git a/test-ssg-project/gradle/wrapper/gradle-wrapper.jar b/test-ssg-project/gradle/wrapper/gradle-wrapper.jar index 2c35211..a4b76b9 100644 Binary files a/test-ssg-project/gradle/wrapper/gradle-wrapper.jar and b/test-ssg-project/gradle/wrapper/gradle-wrapper.jar differ diff --git a/test-ssg-project/gradle/wrapper/gradle-wrapper.properties b/test-ssg-project/gradle/wrapper/gradle-wrapper.properties index 09523c0..e18bc25 100644 --- a/test-ssg-project/gradle/wrapper/gradle-wrapper.properties +++ b/test-ssg-project/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/test-ssg-project/gradlew b/test-ssg-project/gradlew index f5feea6..f3b75f3 100755 --- a/test-ssg-project/gradlew +++ b/test-ssg-project/gradlew @@ -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 diff --git a/test-ssg-project/settings.gradle b/test-ssg-project/settings.gradle index c17a560..199ab7f 100644 --- a/test-ssg-project/settings.gradle +++ b/test-ssg-project/settings.gradle @@ -1,15 +1,5 @@ pluginManagement { - repositories { - mavenCentral() - maven { - url 'https://archiva.jessebrault.com/repository/internal/' - - credentials { - username System.getenv('JBARCHIVA_USERNAME') - password System.getenv('JBARCHIVA_PASSWORD') - } - } - } + includeBuild('../') } rootProject.name = 'test-ssg-project'