diff --git a/backend/app/build.gradle b/backend/app/build.gradle index 3fe559db16..d958f5d516 100644 --- a/backend/app/build.gradle +++ b/backend/app/build.gradle @@ -140,7 +140,7 @@ dependencies { /** * Conditional billing module */ - if (rootProject.project(":billing-app").projectDir.exists()) { + if (gradle.ext.billingAppDirectory.exists()) { implementation(project(':billing-app')) } diff --git a/backend/data/build.gradle b/backend/data/build.gradle index b31c54334a..c09ac0c74f 100644 --- a/backend/data/build.gradle +++ b/backend/data/build.gradle @@ -52,7 +52,6 @@ apply plugin: 'org.hibernate.orm' repositories { mavenCentral() - jcenter() } idea { diff --git a/backend/testing/build.gradle b/backend/testing/build.gradle index 51693a85f3..7c63433d8c 100644 --- a/backend/testing/build.gradle +++ b/backend/testing/build.gradle @@ -43,7 +43,6 @@ apply plugin: "kotlin-kapt" repositories { mavenCentral() - jcenter() } kotlin { diff --git a/build.gradle b/build.gradle index 7821cff1c3..aeb87c2f49 100644 --- a/build.gradle +++ b/build.gradle @@ -117,9 +117,8 @@ project(':server-app').afterEvaluate { project(':ee-app').tasks.findByName("diffChangelog"), ] - def billingDiffChangelog = project(':billing-app').tasks.findByName("diffChangelog") - - if (billingDiffChangelog != null) { + if (gradle.ext.billingAppDirectory.exists()) { + def billingDiffChangelog = project(':billing-app').tasks.findByName("diffChangelog") finalizedBy.add(billingDiffChangelog) } diff --git a/settings.gradle b/settings.gradle index 09a7a68cbb..caa73f472d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -83,11 +83,18 @@ project(':server-app').projectDir = new File('backend/app') include ':data' project(':data').projectDir = new File('backend/data') -include ':billing-app' -project(':billing-app').projectDir = new File('../billing/app') +gradle.ext.billingAppDirectory = new File('../billing/app') +gradle.ext.billingTestDirectory = new File('../billing/tests') -include ':billing-test' -project(':billing-test').projectDir = new File('../billing/tests') +if (gradle.ext.billingAppDirectory.exists()) { + include ':billing-app' + project(':billing-app').projectDir = gradle.ext.billingAppDirectory +} + +if (gradle.ext.billingTestDirectory.exists()) { + include ':billing-test' + project(':billing-test').projectDir = gradle.ext.billingTestDirectory +} include ':testing' project(':testing').projectDir = new File('backend/testing')