Skip to content

Allow intellij to load the feature-examples project without GEMFIRE_HOME #43

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
27 changes: 15 additions & 12 deletions feature-examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ plugins {
id "de.undercouch.download" version "4.0.4"
}

if (project.getProperty('gemfireRepositoryUrl').contains('commercial-repo.pivotal.io')) {
if (!project.hasProperty("gemfireReleaseRepoUser") || gemfireReleaseRepoUser.isEmpty()) {
throw new GradleException("Please set gemfireReleaseRepoUser in gradle.properties to the email address you registered at https://commercial-repo.pivotal.io/")
}
if (!project.hasProperty("gemfireReleaseRepoPassword") || gemfireReleaseRepoPassword.isEmpty()) {
throw new GradleException("Please set gemfireReleaseRepoPassword in gradle.properties to the https://commercial-repo.pivotal.io/ password for $gemfireReleaseRepoUser")
}
}

allprojects {
repositories {
if (!gradle.usingGeodeCompositeBuild) {
Expand All @@ -47,19 +56,13 @@ allprojects {
def installDir = System.getenv('GEMFIRE_HOME') ?: System.getenv('GEODE_HOME')

task checkEnv {
if (installDir==null || installDir.isEmpty()) {
throw new GradleException("Please export GEMFIRE_HOME=<the top-level directory extracted from your GemFire .tgz> (if this message persists, you may also need to ./gradlew --stop)")
} else {
println("GemFire directory is $installDir")
}

if (project.getProperty('gemfireRepositoryUrl').contains('commercial-repo.pivotal.io')) {
if (!project.hasProperty("gemfireReleaseRepoUser") || gemfireReleaseRepoUser.isEmpty()) {
throw new GradleException("Please set gemfireReleaseRepoUser in gradle.properties to the email address you registered at https://commercial-repo.pivotal.io/")
}
if (!project.hasProperty("gemfireReleaseRepoPassword") || gemfireReleaseRepoPassword.isEmpty()) {
throw new GradleException("Please set gemfireReleaseRepoPassword in gradle.properties to the https://commercial-repo.pivotal.io/ password for $gemfireReleaseRepoUser")
doLast {
if (installDir == null || installDir.isEmpty()) {
throw new GradleException("Please export GEMFIRE_HOME=<the top-level directory extracted from your GemFire .tgz> (if this message persists, you may also need to ./gradlew --stop)")
} else {
println("GemFire directory is $installDir")
}

}
}

Expand Down