jdaugherty commented on code in PR #148:
URL: https://github.com/apache/grails-quartz/pull/148#discussion_r2160181897
##########
buildSrc/build.gradle:
##########
@@ -9,11 +28,25 @@ file('../gradle.properties').withInputStream {
repositories {
mavenCentral()
Review Comment:
Won't we still need the grails restricted repo for spring rc's etc?
##########
gradle/docs-config.gradle:
##########
@@ -1,34 +1,104 @@
-import org.grails.gradle.plugin.doc.PublishGuideTask
+/*
+ * 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
+ *
+ * https://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.
+ */
-apply plugin: 'org.apache.grails.gradle.grails-docs'
+import org.asciidoctor.gradle.jvm.AsciidoctorTask
-configurations.register('groovydocConfiguration')
-configurations.register('guideConfiguration')
+apply plugin: 'org.asciidoctor.jvm.convert'
-dependencies {
-
- groovydocConfiguration localGroovy(), {
- because 'groovydoc needs to run with the same version as Gradle'
+configurations.register('documentation') {
+ canBeConsumed = false
+ canBeResolved = true
+ attributes {
+ attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category,
Category.LIBRARY))
+ attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling,
Bundling.EXTERNAL))
+ attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage,
Usage.JAVA_RUNTIME))
}
- guideConfiguration 'org.apache.grails:grails-docs-core'
- guideConfiguration 'org.apache.groovy:groovy-ant'
- guideConfiguration 'org.apache.groovy:groovy-templates'
+}
+
+dependencies {
+ documentation platform("org.apache.grails:grails-bom:$grailsVersion")
+ documentation 'org.apache.groovy:groovy-ant'
+ documentation 'org.apache.groovy:groovy-groovydoc'
}
tasks.withType(Groovydoc).configureEach {
access = GroovydocAccess.PROTECTED
processScripts = false
includeMainForScripts = false
- includeAuthor = true
- classpath = configurations.groovydocConfiguration
- groovyClasspath = configurations.groovydocConfiguration
+ includeAuthor = false
+ classpath = configurations.documentation
+ groovyClasspath = configurations.documentation
}
-tasks.withType(PublishGuideTask).configureEach {
- classpath = configurations.guideConfiguration
+tasks.named('asciidoctor', AsciidoctorTask) {
Review Comment:
Why move away from the guide task? We can easily style and have a central
theme with that task.
##########
gradle/rat-root-config.gradle:
##########
@@ -0,0 +1,48 @@
+/*
+ * 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
+ *
+ * https://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.
+ */
+
+import org.nosphere.apache.rat.RatTask
+
+apply plugin: 'org.nosphere.apache.rat'
+
+tasks.named('rat', RatTask) {
+ excludes.addAll(
+ '.asf.yaml', // ASF metadata for github integration excluded from
src zip
+ 'CODE_OF_CONDUCT.md',
+ 'LICENSE',
+ 'NOTICE',
+ 'BUILD_DATE', // build artifact for storing the build date /
verifying
+ 'CHECKSUMS', // build artifact for storing checksums for easy
verification
+ 'PUBLISHED_ARTIFACTS', // build artifact for storing published
artifacts coordinates & paths
+ 'licenses/**', // licenses directory excluded
+ '**/build/**', // Gradle generated build directories
+ '**/.gitattributes', // git configuration isn't code
+ '**/.gradle/**', '**/wrapper/**', 'gradlew*', // gradle wrapper
files excluded from src zip
+ '**/resources/*', // exclude test artifacts
Review Comment:
Does this project actually have test resources?
##########
README.md:
##########
@@ -1,3 +1,19 @@
+<!--
+SPDX-License-Identifier: Apache-2.0
+
+Licensed 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
+
+ https://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.
+-->
Review Comment:
This file needs builds instructions for it to be a valid release.
We also need to add the gradle-bootstrap folder we have added else where
##########
build.gradle:
##########
@@ -6,6 +29,17 @@ plugins {
version = projectVersion
group = 'org.apache.grails'
+def buildInstant =
java.util.Optional.ofNullable(System.getenv('SOURCE_DATE_EPOCH'))
+ .filter(s -> !s.isEmpty())
+ .map(Long::parseLong)
+ .map(Instant::ofEpochSecond)
+ .orElseGet(Instant::now) as Instant
+ext {
+ formattedBuildDate = DateTimeFormatter.ISO_INSTANT.format(buildInstant)
+ buildDate = buildInstant.atZone(ZoneOffset.UTC) // for reproducible builds
+ isCiBuild = System.getenv().containsKey('CI')
+}
+
repositories {
mavenCentral()
maven { url = 'https://repo.grails.org/grails/core' }
Review Comment:
We need to add a filter on the snapshot repo so we do not get blocked for
404s
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]