From b6bbf9b0983e721db05fd34a98f64986d7deff55 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Wed, 24 Jul 2019 11:49:50 +0200 Subject: [PATCH] Do not install gradle. Use gradlew script. --- kiwixbuild/dependencies/__init__.py | 1 - kiwixbuild/dependencies/base.py | 2 +- kiwixbuild/dependencies/gradle.py | 32 ----------------------------- kiwixbuild/platforms/android.py | 7 +------ kiwixbuild/versions.py | 1 - 5 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 kiwixbuild/dependencies/gradle.py diff --git a/kiwixbuild/dependencies/__init__.py b/kiwixbuild/dependencies/__init__.py index 7da734f..240100d 100644 --- a/kiwixbuild/dependencies/__init__.py +++ b/kiwixbuild/dependencies/__init__.py @@ -7,7 +7,6 @@ from . import ( aria2, armhf, flatpak, - gradle, gumbo, icu4c, ios_fat_lib, diff --git a/kiwixbuild/dependencies/base.py b/kiwixbuild/dependencies/base.py index ba6b1a1..4278922 100644 --- a/kiwixbuild/dependencies/base.py +++ b/kiwixbuild/dependencies/base.py @@ -525,7 +525,7 @@ class GradleBuilder(Builder): shutil.copytree(self.source_path, self.build_path) def _compile(self, context): - command = "gradle {gradle_target} {gradle_option}" + command = "./gradlew {gradle_target} {gradle_option}" command = command.format( gradle_target=self.gradle_target, gradle_option=self.gradle_option) diff --git a/kiwixbuild/dependencies/gradle.py b/kiwixbuild/dependencies/gradle.py deleted file mode 100644 index 66ce1d0..0000000 --- a/kiwixbuild/dependencies/gradle.py +++ /dev/null @@ -1,32 +0,0 @@ -from .base import ( - Dependency, - ReleaseDownload, - Builder as BaseBuilder) - -from kiwixbuild.utils import Remotefile, pj, copy_tree, add_execution_right - -class Gradle(Dependency): - neutral = True - name = "gradle" - - class Source(ReleaseDownload): - archive = Remotefile('gradle-5.2-bin.zip', - 'ff322863250159595e93b5a4d17a6f0d21c59a1a0497c1e1cf1d53826485503f', - 'https://services.gradle.org/distributions/gradle-5.2-bin.zip') - - class Builder(BaseBuilder): - @property - def install_path(self): - return self.buildEnv.install_dir - - def build(self): - self.command('install', self._install) - - def _install(self, context): - copy_tree( - pj(self.source_path, "bin"), - pj(self.install_path, "bin"), - post_copy_function = add_execution_right) - copy_tree( - pj(self.source_path, "lib"), - pj(self.install_path, "lib")) diff --git a/kiwixbuild/platforms/android.py b/kiwixbuild/platforms/android.py index 463e6da..0de2066 100644 --- a/kiwixbuild/platforms/android.py +++ b/kiwixbuild/platforms/android.py @@ -123,7 +123,7 @@ class AndroidX8664(AndroidPlatformInfo): class Android(MetaPlatformInfo): name = "android" - toolchain_names = ['android-sdk', 'gradle'] + toolchain_names = ['android-sdk'] compatible_hosts = ['fedora', 'debian'] @property @@ -143,10 +143,5 @@ class Android(MetaPlatformInfo): def sdk_builder(self): return get_target_step('android-sdk', 'neutral') - @property - def gradle_builder(self): - return get_target_step('gradle', 'neutral') - def set_env(self, env): env['ANDROID_HOME'] = self.sdk_builder.install_path - env['PATH'] = ':'.join([pj(self.gradle_builder.install_path, 'bin'), env['PATH']]) diff --git a/kiwixbuild/versions.py b/kiwixbuild/versions.py index 78f8a38..89c77ba 100644 --- a/kiwixbuild/versions.py +++ b/kiwixbuild/versions.py @@ -54,7 +54,6 @@ base_deps_versions = { 'libmicrohttpd' : '0.9.66', 'gumbo' : '0.10.1', 'icu4c' : '58.2', - 'gradle' : '5.2', 'libaria2' : '1.33.1', 'libmagic' : '5.35', 'android-sdk' : 'r25.2.3',