Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit a6aa175

Browse files
committed
Updated Build
1 parent d9dde28 commit a6aa175

File tree

3 files changed

+35
-13
lines changed

3 files changed

+35
-13
lines changed

.github/workflows/gradle.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
with:
4242
arguments: check -Dgeb.env=chromeHeadless
4343
env:
44+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
4445
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
4546
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
4647
- name: Run Build
@@ -64,6 +65,9 @@ jobs:
6465
uses: gradle/gradle-build-action@v2
6566
if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '8'
6667
env:
68+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
69+
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
70+
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
6771
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
6872
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
6973
with:
@@ -72,6 +76,10 @@ jobs:
7276
id: docs
7377
if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '8'
7478
uses: gradle/gradle-build-action@v2
79+
env:
80+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
81+
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
82+
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
7583
with:
7684
arguments: docs:docs
7785
- name: Determine docs target repository

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
token: ${{ secrets.GITHUB_TOKEN }}
3232
- name: Publish to Sonatype OSSRH
3333
env:
34+
TAGGED_VERSION: ${{ steps.release_version.outputs.release_version }}
35+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
36+
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
37+
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
3438
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
3539
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
3640
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}

docs/build.gradle

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
ext {
2-
githubBranch = "7.1.x"
2+
githubBranch = "8.0.x"
33
checkOutDir = "build/checkout"
4+
explicitGormSrc = System.getProperty("gorm.src") ?: (project.hasProperty('gorm.src') ? project.getProperty("gorm.src") : null)
5+
gormSrc = explicitGormSrc ? file(explicitGormSrc).absolutePath : "$checkOutDir/gorm-src"
46
zipFile = "build/source.zip"
57

68
coreProjects = [
@@ -69,12 +71,17 @@ asciidoctorj {
6971
}
7072

7173
task fetchSource {
72-
doLast {
73-
ant.mkdir dir: project.buildDir
74-
ant.mkdir dir: checkOutDir
74+
outputs.dir layout.buildDirectory.dir('checkout')
75+
inputs.properties(branch: githubBranch)
76+
77+
onlyIf {
78+
println "GORM SRC=$explicitGormSrc"
79+
return !explicitGormSrc
80+
}
7581

82+
doLast {
7683
println "Downloading GORM source code."
77-
def tag = System.getenv('TRAVIS_TAG')
84+
def tag = System.getenv('TAGGED_VERSION')
7885
if (tag) {
7986
ant.get src: "https://github.com/grails/grails-data-mapping/archive/${tag}.zip", dest: zipFile, verbose: true
8087
} else {
@@ -86,10 +93,8 @@ task fetchSource {
8693
}
8794
println "GORM source code downloaded."
8895
}
89-
}
9096

91-
fetchSource.inputs.properties(branch:githubBranch)
92-
fetchSource.outputs.dir checkOutDir
97+
}
9398

9499

95100
task copyDocs(type:Copy, dependsOn:asciidoctor) {
@@ -131,8 +136,13 @@ task docs(dependsOn:[asciidoctor, groovydoc, copyDocs, copyResources] +
131136
.collect { project -> project.tasks.groovydoc }
132137
)
133138

134-
//task assemble(type: Zip, dependsOn:docs) {
135-
// from "${project.buildDir}/docs"
136-
// baseName = "${project.name}-${project.version}"
137-
// destinationDir = project.file("${project.buildDir}/distributions")
138-
//}
139+
task assembleDocsDist(type: Zip) {
140+
dependsOn docs
141+
from "${project.buildDir}/docs"
142+
include '*'
143+
include '*/**'
144+
archiveFileName = "${project.name}-${project.version}.zip"
145+
destinationDirectory = project.layout.buildDirectory.dir('distributions')
146+
}
147+
148+
docs.finalizedBy assembleDocsDist

0 commit comments

Comments
 (0)