Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for grails.home set to not cause source to be fetched #347

Merged
merged 3 commits into from
Jul 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ext.checkOutDir = "${buildDir.path}/checkout"
ext.outputDir = "${buildDir.path}/docs"
ext.githubBranch = "3.0.x"

ext.explicitGrailsHome = System.getProperty("grails.home")
ext.explicitGrailsHome = System.getProperty("grails.home") ?: project.getProperty("grails.home")
ext.grailsHome = explicitGrailsHome ? file(explicitGrailsHome).absolutePath : "$checkOutDir/grails-src"

configurations {
Expand Down Expand Up @@ -60,7 +60,7 @@ fetchGrailsSource.onlyIf { !explicitGrailsHome }

task apiDocs(type: Exec, dependsOn: 'fetchGrailsSource') {
commandLine = ["./gradlew", "groovydoc", '--info', '--stacktrace']
workingDir = "${checkOutDir}/grails-src"
workingDir = grailsHome
environment "GRADLE_OPTS", "-Xmx2048m -Xms256m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError"
}

Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
grails.version=3.0.2
#Let grails.home be empty
grails.home=
4 changes: 2 additions & 2 deletions src/en/guide/contributing/patchesDoc.gdoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Fortunately, you can reduce the overall build time with a couple of useful optio
./gradlew -Dgrails.home=/home/user/projects/grails-core docs
{code}

The Grails source is required because the guide links to its API documentation and the build needs to ensure it's generated. If you don't specify a @grails.home@ property, then the build will fetch the Grails source - a download of 10s of megabytes. It must then compile the Grails source which can take a while too.
The Grails source is required because the guide links tgo its API documentation and the build needs to ensure it's generated. If you don't specify a @grails.home@ property, then the build will fetch the Grails source - a download of 10s of megabytes. It must then compile the Grails source which can take a while too.

Additionally you can create a local.properties file with this variable set:
Additionally you can create a ~/.gradle/gradle.properties file with this variable set:
{code}
grails.home=/home/user/projects/grails-core
{code}
Expand Down