You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by sb...@apache.org on 2026/03/02 16:06:38 UTC
(grails-static-website) branch feature/bsky.domain.name created (now a401af9b7d1)
This is an automated email from the ASF dual-hosted git repository.
sbglasius pushed a change to branch feature/bsky.domain.name
in repository https://gitbox.apache.org/repos/asf/grails-static-website.git
at a401af9b7d1 Added Bsky atproto-did to identify @grails.apache.org as BSky account name
This branch includes the following new commits:
new a401af9b7d1 Added Bsky atproto-did to identify @grails.apache.org as BSky account name
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(grails-static-website) 01/01: Added Bsky atproto-did to identify @grails.apache.org as BSky account name
Posted by sb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sbglasius pushed a commit to branch feature/bsky.domain.name
in repository https://gitbox.apache.org/repos/asf/grails-static-website.git
commit a401af9b7d1cb6aa06c6b40263d8aabf52b22e23
Author: Søren Berg Glasius <so...@glasius.dk>
AuthorDate: Mon Mar 2 17:06:28 2026 +0100
Added Bsky atproto-did to identify @grails.apache.org as BSky account name
---
.../website/gradle/GrailsWebsiteExtension.groovy | 17 +++--
.../website/gradle/GrailsWebsitePlugin.groovy | 4 ++
.../website/gradle/tasks/BskyAtProtoDidTask.groovy | 78 ++++++++++++++++++++++
conf/social.yml | 3 +
pages/.well-known/atproto-did | 1 +
5 files changed, 98 insertions(+), 5 deletions(-)
diff --git a/buildSrc/src/main/groovy/website/gradle/GrailsWebsiteExtension.groovy b/buildSrc/src/main/groovy/website/gradle/GrailsWebsiteExtension.groovy
index 2ae07cecaff..695890e954f 100644
--- a/buildSrc/src/main/groovy/website/gradle/GrailsWebsiteExtension.groovy
+++ b/buildSrc/src/main/groovy/website/gradle/GrailsWebsiteExtension.groovy
@@ -18,10 +18,7 @@
*/
package website.gradle
-import javax.inject.Inject
-
import groovy.transform.CompileStatic
-
import org.gradle.api.file.DirectoryProperty
import org.gradle.api.file.ProjectLayout
import org.gradle.api.file.RegularFileProperty
@@ -30,17 +27,21 @@ import org.gradle.api.provider.ListProperty
import org.gradle.api.provider.Property
import org.gradle.api.provider.ProviderFactory
+import javax.inject.Inject
+
@CompileStatic
class GrailsWebsiteExtension {
public static final String NAME = 'grailsWebsite'
final RegularFileProperty htaccess
+ final RegularFileProperty bskyAtProtoDid
final RegularFileProperty modules
final RegularFileProperty profiles
final RegularFileProperty questions
final RegularFileProperty releases
final RegularFileProperty template
+ final RegularFileProperty social
final DirectoryProperty assetsDir
final DirectoryProperty minutesDir
@@ -61,6 +62,9 @@ class GrailsWebsiteExtension {
htaccess = objects.fileProperty()
htaccess.convention(layout.buildDirectory.file('dist/.htaccess'))
+ bskyAtProtoDid = objects.fileProperty()
+ bskyAtProtoDid.convention(layout.buildDirectory.file('dist/.well-known/atproto-did'))
+
modules = objects.fileProperty()
modules.convention(layout.projectDirectory.file('conf/modules.yml'))
@@ -73,6 +77,9 @@ class GrailsWebsiteExtension {
releases = objects.fileProperty()
releases.convention(layout.projectDirectory.file('conf/releases.yml'))
+ social = objects.fileProperty()
+ social.convention(layout.projectDirectory.file('conf/social.yml'))
+
template = objects.fileProperty()
template.convention(layout.projectDirectory.file('templates/document.html'))
@@ -104,8 +111,8 @@ class GrailsWebsiteExtension {
url = objects.property(String)
url.convention(
- providers.environmentVariable('GRAILS_WS_URL')
- .orElse('https://grails.apache.org')
+ providers.environmentVariable('GRAILS_WS_URL')
+ .orElse('https://grails.apache.org')
)
// List property with convention
diff --git a/buildSrc/src/main/groovy/website/gradle/GrailsWebsitePlugin.groovy b/buildSrc/src/main/groovy/website/gradle/GrailsWebsitePlugin.groovy
index 8d39010052a..905ed89cee8 100644
--- a/buildSrc/src/main/groovy/website/gradle/GrailsWebsitePlugin.groovy
+++ b/buildSrc/src/main/groovy/website/gradle/GrailsWebsitePlugin.groovy
@@ -25,6 +25,7 @@ import org.gradle.api.Project
import website.gradle.tasks.AssetsTask
import website.gradle.tasks.BlogTask
+import website.gradle.tasks.BskyAtProtoDidTask
import website.gradle.tasks.DocumentationTask
import website.gradle.tasks.DownloadTask
import website.gradle.tasks.GrailsWebsiteTask
@@ -55,6 +56,7 @@ class GrailsWebsitePlugin implements Plugin<Project> {
DownloadTask.register(project, siteExt)
GuidesTask.register(project, siteExt)
HtaccessTask.register(project, siteExt)
+ BskyAtProtoDidTask.register(project, siteExt)
MinutesTask.register(project, siteExt)
PluginsTask.register(project, siteExt)
ProfilesTask.register(project, siteExt)
@@ -68,6 +70,7 @@ class GrailsWebsitePlugin implements Plugin<Project> {
it.dependsOn(MinutesTask.NAME)
it.dependsOn(PluginsTask.NAME)
it.dependsOn(HtaccessTask.NAME)
+ it.dependsOn(BskyAtProtoDidTask.NAME )
}
RenderSiteTask.register(project, siteExt).configure {
@@ -85,6 +88,7 @@ class GrailsWebsitePlugin implements Plugin<Project> {
it.finalizedBy(BlogTask.NAME)
it.finalizedBy(MinutesTask.NAME)
it.finalizedBy(HtaccessTask.NAME)
+ it.finalizedBy(BskyAtProtoDidTask.NAME)
it.finalizedBy(PluginsTask.NAME)
it.finalizedBy(SitemapTask.NAME)
}
diff --git a/buildSrc/src/main/groovy/website/gradle/tasks/BskyAtProtoDidTask.groovy b/buildSrc/src/main/groovy/website/gradle/tasks/BskyAtProtoDidTask.groovy
new file mode 100644
index 00000000000..8ffbfe3a782
--- /dev/null
+++ b/buildSrc/src/main/groovy/website/gradle/tasks/BskyAtProtoDidTask.groovy
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package website.gradle.tasks
+
+import groovy.transform.CompileStatic
+import org.gradle.api.Project
+import org.gradle.api.file.RegularFileProperty
+import org.gradle.api.tasks.CacheableTask
+import org.gradle.api.tasks.InputFile
+import org.gradle.api.tasks.Internal
+import org.gradle.api.tasks.OutputFile
+import org.gradle.api.tasks.PathSensitive
+import org.gradle.api.tasks.PathSensitivity
+import org.gradle.api.tasks.TaskAction
+import org.gradle.api.tasks.TaskProvider
+import org.yaml.snakeyaml.Yaml
+import website.gradle.GrailsWebsiteExtension
+
+@CompileStatic
+@CacheableTask
+abstract class BskyAtProtoDidTask extends GrailsWebsiteTask {
+
+ @Internal
+ final String description = 'Generates the .well-known/atproto-did file for Bsky'
+
+ public static final String NAME = 'genBskyAtProtoDid'
+
+ @InputFile
+ @PathSensitive(PathSensitivity.RELATIVE)
+ abstract RegularFileProperty getSocial()
+
+ @OutputFile
+ abstract RegularFileProperty getBskyAtProtoDid()
+
+ static TaskProvider<BskyAtProtoDidTask> register(
+ Project project,
+ GrailsWebsiteExtension siteExt,
+ String name = NAME
+ ) {
+ project.tasks.register(name, BskyAtProtoDidTask) {
+ it.social.set(siteExt.social)
+ it.bskyAtProtoDid.set(siteExt.bskyAtProtoDid)
+ }
+ }
+
+ @TaskAction
+ void generateAtProtoDid() {
+ bskyAtProtoDid.get().asFile.tap {
+ parentFile.mkdirs()
+ text = getBskyAtProtoDidText()
+ }
+ }
+
+ private Map getSocialProperties() {
+ File socialFile = social.get().asFile
+ new Yaml().load(socialFile.newDataInputStream()) as Map
+ }
+
+ private String getBskyAtProtoDidText() {
+ socialProperties['bsky']['did']
+ }
+}
diff --git a/conf/social.yml b/conf/social.yml
new file mode 100644
index 00000000000..3f320aefbb1
--- /dev/null
+++ b/conf/social.yml
@@ -0,0 +1,3 @@
+bsky:
+ handle: '@grails.apache.org'
+ did: 'did:plc:5ad34hau6u4tw25cuh3cewwl'
\ No newline at end of file
diff --git a/pages/.well-known/atproto-did b/pages/.well-known/atproto-did
new file mode 100644
index 00000000000..aa3412d492a
--- /dev/null
+++ b/pages/.well-known/atproto-did
@@ -0,0 +1 @@
+did:plc:5ad34hau6u4tw25cuh3cewwl