Work on 0.5.0-SNAPSHOT; various updates and such.

This commit is contained in:
Jesse Brault 2025-05-31 20:43:40 -05:00
parent 4757a2e9a5
commit 82a8be76b5
6 changed files with 56 additions and 5 deletions

16
README.md Normal file
View File

@ -0,0 +1,16 @@
# Static Site Generator (SSG)
## Updating Gradle
Update the Gradle wrapper via `gradle/wrapper/gradle-wrapper.properties`. Make sure that the tooling-api dependency is
updated to the same version in `cli/build.gradle`.
## Version-bumping
Update the version of the project in `buildSrc/src/main/groovy/ssg-common.gradle`. Then update the references to the
`cli` and `api` projects in `ssg-gradle-plugin/src/main/java/com/jessebrault/ssg/gradle/SsgGradlePlugin.java`.
## Publishing
Gradle command `publishAllPublicationsToJbArchiva<Internal|Snapshots>Repository`. Which one of `internal` or `snapshots`
appears depends on the current version.

View File

@ -4,7 +4,7 @@ plugins {
}
group 'com.jessebrault.ssg'
version '0.4.3-SNAPSHOT'
version '0.5.0-SNAPSHOT'
repositories {
mavenCentral()

View File

@ -16,7 +16,7 @@ dependencies {
implementation libs.picocli
implementation libs.log4j2.api
implementation libs.log4j2.core
implementation "org.gradle:gradle-tooling-api:8.7"
implementation "org.gradle:gradle-tooling-api:8.14.1"
runtimeOnly libs.log4j2.slf4j2.impl
}

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@ -162,8 +162,8 @@ public class SsgGradlePlugin implements Plugin<Project> {
Configuration ssgApiConfiguration,
Configuration ssgCliConfiguration
) {
final Dependency ssgApi = project.getDependencies().create("com.jessebrault.ssg:ssg-api:0.4.2");
final Dependency ssgCli = project.getDependencies().create("com.jessebrault.ssg:ssg-cli:0.4.2");
final Dependency ssgApi = project.getDependencies().create("com.jessebrault.ssg:api:0.5.0-SNAPSHOT");
final Dependency ssgCli = project.getDependencies().create("com.jessebrault.ssg:cli:0.5.0-SNAPSHOT");
ssgApiConfiguration.getDependencies().add(ssgApi);
ssgCliConfiguration.getDependencies().add(ssgCli);
}

View File

@ -0,0 +1,35 @@
package com.jessebrault.ssg.gradle;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.io.TempDir;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
/**
* This is just a scaffolding test file for the future.
*/
public class SsgGradlePluginTests {
@TempDir
private Path tempDir;
private Path buildFile;
@BeforeEach
public void beforeEach() throws IOException {
buildFile = tempDir.resolve("build.gradle");
Files.writeString(buildFile, """
plugins {
id 'com.jessebrault.ssg'
}
dependencies {
implementation 'org.apache.groovy:groovy:4.0.25'
}
"""
);
}
}