Merge pull request #290 from kiwix/mhutti1/dep-update

Increase dependency version number
This commit is contained in:
Matthieu Gautier 2019-02-06 10:23:42 +01:00 committed by GitHub
commit 14a65ae6e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 23 deletions

View File

@ -84,13 +84,6 @@ addons:
matrix: matrix:
allow_failures: allow_failures:
- env: PLATFORM="native_dyn" DESKTOP_ONLY=1 - 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: include:
- env: PLATFORM="native_dyn" DESKTOP_ONLY=1 - env: PLATFORM="native_dyn" DESKTOP_ONLY=1
addons: addons:

View File

@ -27,16 +27,15 @@ class android_sdk(Dependency):
shutil.copytree(self.source_path, tools_dir) shutil.copytree(self.source_path, tools_dir)
script = pj(tools_dir, 'android') script = pj(tools_dir, 'android')
command = '{script} --verbose update sdk -a --no-ui --filter {packages}' 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( command = command.format(
script=script, 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") run_command(command, self.install_path, context, input="y\n")
def _fix_licenses(self, context): def _fix_licenses(self, context):

View File

@ -10,9 +10,9 @@ class Gradle(Dependency):
name = "gradle" name = "gradle"
class Source(ReleaseDownload): class Source(ReleaseDownload):
archive = Remotefile('gradle-4.6-bin.zip', archive = Remotefile('gradle-5.1.1-bin.zip',
'98bd5fd2b30e070517e03c51cbb32beee3e2ee1a84003a5a5d748996d4b1b915', '4953323605c5d7b89e97d0dc7779e275bccedefcdac090aec123375eae0cc798',
'https://services.gradle.org/distributions/gradle-4.6-bin.zip') 'https://services.gradle.org/distributions/gradle-5.1.1-bin.zip')
class Builder(BaseBuilder): class Builder(BaseBuilder):
@property @property

View File

@ -35,7 +35,7 @@ release_versions = {
# This is the "version" of the whole base_deps_versions dict. # This is the "version" of the whole base_deps_versions dict.
# Change this when you change base_deps_versions. # Change this when you change base_deps_versions.
base_deps_meta_version = '14' base_deps_meta_version = '15'
base_deps_versions = { base_deps_versions = {

View File

@ -8,7 +8,7 @@ from datetime import date
import tarfile, zipfile import tarfile, zipfile
import subprocess import subprocess
import re import re
from urllib.request import urlretrieve from urllib.request import urlopen
from urllib.error import URLError from urllib.error import URLError
from kiwixbuild.versions import ( 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 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': if PLATFORM != 'flatpak':
# The first thing we need to do is to (potentially) download already compiled base dependencies. # 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( 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) print_message("Getting archive {}", base_dep_archive_name)
try: try:
local_filename, _ = urlretrieve( local_filename = download_base_archive(base_dep_archive_name)
'http://tmp.kiwix.org/ci/{}'.format(base_dep_archive_name))
with tarfile.open(local_filename) as f: with tarfile.open(local_filename) as f:
f.extractall(str(HOME)) f.extractall(str(HOME))
except URLError: except URLError:
@ -275,8 +287,7 @@ if PLATFORM != 'flatpak':
version=base_deps_meta_version) version=base_deps_meta_version)
print_message("Getting archive {}", archive_name) print_message("Getting archive {}", archive_name)
try: try:
local_filename, _ = urlretrieve( local_filename = download_base_archive(archive_name)
'http://tmp.kiwix.org/ci/{}'.format(archive_name))
with tarfile.open(local_filename) as f: with tarfile.open(local_filename) as f:
f.extractall(str(HOME)) f.extractall(str(HOME))
except URLError: except URLError: