Merge pull request #290 from kiwix/mhutti1/dep-update
Increase dependency version number
This commit is contained in:
commit
14a65ae6e8
|
@ -84,13 +84,6 @@ addons:
|
|||
matrix:
|
||||
allow_failures:
|
||||
- env: PLATFORM="native_dyn" DESKTOP_ONLY=1
|
||||
- env: PLATFORM="android_arm"
|
||||
- env: PLATFORM="android_arm64"
|
||||
- env: PLATFORM="android_mips"
|
||||
- env: PLATFORM="android_mips64"
|
||||
- env: PLATFORM="android_x86"
|
||||
- env: PLATFORM="android_x86_64"
|
||||
- env: PLATFORM="android"
|
||||
include:
|
||||
- env: PLATFORM="native_dyn" DESKTOP_ONLY=1
|
||||
addons:
|
||||
|
|
|
@ -27,16 +27,15 @@ class android_sdk(Dependency):
|
|||
shutil.copytree(self.source_path, tools_dir)
|
||||
script = pj(tools_dir, 'android')
|
||||
command = '{script} --verbose update sdk -a --no-ui --filter {packages}'
|
||||
packages = [
|
||||
'tools','platform-tools',
|
||||
'build-tools-28.0.3', 'build-tools-27.0.3',
|
||||
'android-28', 'android-27'
|
||||
]
|
||||
command = command.format(
|
||||
script=script,
|
||||
packages = ','.join(str(i) for i in [1,2,8,34,162])
|
||||
packages = ','.join(packages)
|
||||
)
|
||||
# packages correspond to :
|
||||
# - 1 : Android SDK Tools, revision 25.2.5
|
||||
# - 2 : Android SDK Platform-tools, revision 25.0.3
|
||||
# - 8 : Android SDK Build-tools, revision 24.0.1
|
||||
# - 34 : SDK Platform Android 7.0, API 24, revision 2
|
||||
# - 162 : Android Support Repository, revision 44
|
||||
run_command(command, self.install_path, context, input="y\n")
|
||||
|
||||
def _fix_licenses(self, context):
|
||||
|
|
|
@ -10,9 +10,9 @@ class Gradle(Dependency):
|
|||
name = "gradle"
|
||||
|
||||
class Source(ReleaseDownload):
|
||||
archive = Remotefile('gradle-4.6-bin.zip',
|
||||
'98bd5fd2b30e070517e03c51cbb32beee3e2ee1a84003a5a5d748996d4b1b915',
|
||||
'https://services.gradle.org/distributions/gradle-4.6-bin.zip')
|
||||
archive = Remotefile('gradle-5.1.1-bin.zip',
|
||||
'4953323605c5d7b89e97d0dc7779e275bccedefcdac090aec123375eae0cc798',
|
||||
'https://services.gradle.org/distributions/gradle-5.1.1-bin.zip')
|
||||
|
||||
class Builder(BaseBuilder):
|
||||
@property
|
||||
|
|
|
@ -35,7 +35,7 @@ release_versions = {
|
|||
|
||||
# This is the "version" of the whole base_deps_versions dict.
|
||||
# Change this when you change base_deps_versions.
|
||||
base_deps_meta_version = '14'
|
||||
base_deps_meta_version = '15'
|
||||
|
||||
|
||||
base_deps_versions = {
|
||||
|
|
|
@ -8,7 +8,7 @@ from datetime import date
|
|||
import tarfile, zipfile
|
||||
import subprocess
|
||||
import re
|
||||
from urllib.request import urlretrieve
|
||||
from urllib.request import urlopen
|
||||
from urllib.error import URLError
|
||||
|
||||
from kiwixbuild.versions import (
|
||||
|
@ -252,6 +252,19 @@ for p in (NIGHTLY_KIWIX_ARCHIVES_DIR,
|
|||
|
||||
make_release = re.fullmatch(r"[0-9]+\.[0-9]+\.[0-9]+", environ.get('TRAVIS_TAG', '')) is not None
|
||||
|
||||
def download_base_archive(base_name):
|
||||
url = 'http://tmp.kiwix.org/ci/{}'.format(base_name)
|
||||
file_path = str(HOME/base_name)
|
||||
batch_size = 1024*1024*8
|
||||
with urlopen(url) as resource, open(file_path, 'wb') as file:
|
||||
while True:
|
||||
batch = resource.read(batch_size)
|
||||
if not batch:
|
||||
break
|
||||
print(".", end="")
|
||||
file.write(batch)
|
||||
return file_path
|
||||
|
||||
if PLATFORM != 'flatpak':
|
||||
# The first thing we need to do is to (potentially) download already compiled base dependencies.
|
||||
base_dep_archive_name = "base_deps_{os}_{platform}_{version}.tar.gz".format(
|
||||
|
@ -261,8 +274,7 @@ if PLATFORM != 'flatpak':
|
|||
|
||||
print_message("Getting archive {}", base_dep_archive_name)
|
||||
try:
|
||||
local_filename, _ = urlretrieve(
|
||||
'http://tmp.kiwix.org/ci/{}'.format(base_dep_archive_name))
|
||||
local_filename = download_base_archive(base_dep_archive_name)
|
||||
with tarfile.open(local_filename) as f:
|
||||
f.extractall(str(HOME))
|
||||
except URLError:
|
||||
|
@ -275,8 +287,7 @@ if PLATFORM != 'flatpak':
|
|||
version=base_deps_meta_version)
|
||||
print_message("Getting archive {}", archive_name)
|
||||
try:
|
||||
local_filename, _ = urlretrieve(
|
||||
'http://tmp.kiwix.org/ci/{}'.format(archive_name))
|
||||
local_filename = download_base_archive(archive_name)
|
||||
with tarfile.open(local_filename) as f:
|
||||
f.extractall(str(HOME))
|
||||
except URLError:
|
||||
|
|
Loading…
Reference in New Issue