This is an automated email from the ASF dual-hosted git repository.

apkhmv pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 4c79c5d97a IGNTIE-20629 Exclude ODBC build from assemble pipeline by 
default (#2706)
4c79c5d97a is described below

commit 4c79c5d97aa99a455b9cf5e9de47e4ecddec451c
Author: Mikhail <pochat...@users.noreply.github.com>
AuthorDate: Fri Oct 20 14:44:26 2023 +0300

    IGNTIE-20629 Exclude ODBC build from assemble pipeline by default (#2706)
---
 gradle.properties                        |  3 +++
 gradle/wrapper/gradle-wrapper.properties |  2 +-
 modules/platforms/build.gradle           | 12 +++++++-----
 packaging/odbc/build.gradle              | 27 +++++++++++++++++++++++++--
 4 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/gradle.properties b/gradle.properties
index 2fa7193642..3ec162e247 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -24,3 +24,6 @@ org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
 
 #staging_user=*INSERT STAGING USERNAME HERE*
 #staging_password=*INSERT STAGING PASSWORD HERE*
+
+##Use in case when need to build odbc driver.
+#odbc.enable=true
diff --git a/gradle/wrapper/gradle-wrapper.properties 
b/gradle/wrapper/gradle-wrapper.properties
index 98debb84d5..740908bf52 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
diff --git a/modules/platforms/build.gradle b/modules/platforms/build.gradle
index 8481186642..3e835493b9 100644
--- a/modules/platforms/build.gradle
+++ b/modules/platforms/build.gradle
@@ -152,10 +152,12 @@ if (project.hasProperty('prepareRelease')) {
 }
 
 artifacts {
-    odbc(file("$buildDir/cpp/lib/libignite3-odbc.so")) {
-        builtBy cmakeBuildOdbc
-    }
-    odbc(file("$buildDir/cpp/lib/libignite3-odbc.so.3")) {
-        builtBy cmakeBuildOdbc
+    if (project.hasProperty('odbc.enable')) {
+        odbc(file("$buildDir/cpp/lib/libignite3-odbc.so")) {
+            builtBy cmakeBuildOdbc
+        }
+        odbc(file("$buildDir/cpp/lib/libignite3-odbc.so.3")) {
+            builtBy cmakeBuildOdbc
+        }
     }
 }
diff --git a/packaging/odbc/build.gradle b/packaging/odbc/build.gradle
index c188f201ab..75dfb9495d 100644
--- a/packaging/odbc/build.gradle
+++ b/packaging/odbc/build.gradle
@@ -45,6 +45,10 @@ def tokens = [
 ]
 
 task replacePackageScriptVars(type: Copy) {
+    onlyIf {
+        project.hasProperty('odbc.enable')
+    }
+
     from "$rootDir/packaging/odbc/ignite3-odbc.ini"
 
     from "$rootDir/packaging/odbc/scripts"
@@ -68,10 +72,26 @@ distributions {
     }
 }
 
-distZip.dependsOn replacePackageScriptVars
-distTar.dependsOn replacePackageScriptVars
+distZip {
+    onlyIf {
+        project.hasProperty('odbc.enable')
+    }
+
+    dependsOn replacePackageScriptVars
+}
+
+distTar {
+    onlyIf {
+        project.hasProperty('odbc.enable')
+    }
+
+    dependsOn replacePackageScriptVars
+}
 
 buildRpm {
+    onlyIf {
+        project.hasProperty('odbc.enable')
+    }
     dependsOn replacePackageScriptVars
     requires("unixODBC")
 
@@ -82,6 +102,9 @@ buildRpm {
 }
 
 buildDeb {
+    onlyIf {
+        project.hasProperty('odbc.enable')
+    }
     dependsOn replacePackageScriptVars
     requires("unixodbc")
     requires("odbcinst")

Reply via email to