From b4032aeb6efa359572635d431a7ee6e0be95a9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Sat, 19 Jul 2014 21:54:48 +0200 Subject: [PATCH 01/12] Simple Travis CI setup: test if project will compile to APK successfully --- .gitignore | 1 - .travis.yml | 16 ++++++++ build.xml | 92 ++++++++++++++++++++++++++++++++++++++++++++++ project.properties | 15 ++++++++ 4 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 build.xml create mode 100644 project.properties diff --git a/.gitignore b/.gitignore index 95abdd8..e0a03fe 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ gen/ *.swp *~.nib local.properties -project.properties .classpath .settings/ .loadpath diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..513b389 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: android +android: + components: + - build-tools-19.1.0 + - android-19 + - sysimg-19 + - extra-android-support + licenses: + - android-sdk-license-bcbbd656 + - '.*intel.+' +before_install: + - git submodule update --init --recursive +install: + - ./setup-ant.sh +script: + - ant debug diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..db1929c --- /dev/null +++ b/build.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project.properties b/project.properties new file mode 100644 index 0000000..ba4d01a --- /dev/null +++ b/project.properties @@ -0,0 +1,15 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-19 +android.library.reference.1=./external/netcipher/libnetcipher From a40a9e70ed0418d5ec1f72b96ff487a64f3fe2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Sat, 19 Jul 2014 22:07:22 +0200 Subject: [PATCH 02/12] Allow accepting any android-sdk-license in tests, remove unused sysimg --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 513b389..55e251a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,9 @@ android: components: - build-tools-19.1.0 - android-19 - - sysimg-19 - extra-android-support licenses: - - android-sdk-license-bcbbd656 + - 'android-sdk-license-.+' - '.*intel.+' before_install: - git submodule update --init --recursive From b9086baf0b7bbd5691f96a4f27bf719091625997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Sat, 19 Jul 2014 22:28:01 +0200 Subject: [PATCH 03/12] Add empty missing file ant.properties --- ant.properties | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ant.properties diff --git a/ant.properties b/ant.properties new file mode 100644 index 0000000..e69de29 From 335beb1a00fd03959d75bc1e3212547300d0421e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Sun, 20 Jul 2014 00:57:56 +0200 Subject: [PATCH 04/12] Configure android lint --- .travis.yml | 2 +- lint.xml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 55e251a..ea02b6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,4 @@ before_install: install: - ./setup-ant.sh script: - - ant debug + - lint -w --exitcode --disable MissingTranslation . && ant debug diff --git a/lint.xml b/lint.xml index 7edd00c..cd410d4 100644 --- a/lint.xml +++ b/lint.xml @@ -1,4 +1,7 @@ + + + - \ No newline at end of file + From 00e66547af7cc14b723f1b0c44298ee90eec1b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Sun, 20 Jul 2014 13:04:45 +0200 Subject: [PATCH 05/12] Fix "Error: No .class files were found in project ".", so none of the classfile based checks could be run." --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ea02b6f..972e607 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,4 @@ before_install: install: - ./setup-ant.sh script: - - lint -w --exitcode --disable MissingTranslation . && ant debug + - ant debug && lint -w --exitcode --disable MissingTranslation . From a0b0deab906a8116de7d228e7d943f1156bcb92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Sun, 20 Jul 2014 13:05:19 +0200 Subject: [PATCH 06/12] Fix path to library --- project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.properties b/project.properties index ba4d01a..bd48a11 100644 --- a/project.properties +++ b/project.properties @@ -12,4 +12,4 @@ proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project. # Project target. target=android-19 -android.library.reference.1=./external/netcipher/libnetcipher +android.library.reference.1=external/netcipher/libnetcipher From c9bc6e569984d24ed159bc455813b252e999f5e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Sun, 20 Jul 2014 13:17:53 +0200 Subject: [PATCH 07/12] Fix lint errors and warnings in license activity layout --- res/layout/license_activity.xml | 26 +++++++++++++------------- res/values/strings.xml | 4 ++++ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/res/layout/license_activity.xml b/res/layout/license_activity.xml index 7953579..cc5553b 100644 --- a/res/layout/license_activity.xml +++ b/res/layout/license_activity.xml @@ -14,19 +14,19 @@ android:paddingTop="10dp" > @@ -48,19 +48,19 @@ android:paddingTop="10dp" > @@ -81,19 +81,19 @@ android:paddingTop="10dp" > @@ -103,4 +103,4 @@ android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:background="#cdcdcd" /> - \ No newline at end of file + diff --git a/res/values/strings.xml b/res/values/strings.xml index ea162d4..fb1e16d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -168,4 +168,8 @@ Default Custom Untititled + Mozilla Public License v. 2.0 + Freeware + Android Open Source Project + hpHosts Ad Server List From 046f839ccf83adba909b55030a907d08529d4816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Sun, 20 Jul 2014 13:18:21 +0200 Subject: [PATCH 08/12] Fix typo --- res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index fb1e16d..f8e7923 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -167,7 +167,7 @@ Clear history on exit Default Custom - Untititled + Untitled Mozilla Public License v. 2.0 Freeware Android Open Source Project From 6f8c66cb9944b848576d501a24532eec595275f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Sun, 20 Jul 2014 13:20:50 +0200 Subject: [PATCH 09/12] Fix lint error in settings activity layout --- res/layout/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/layout/settings.xml b/res/layout/settings.xml index 24b7970..6dbe040 100644 --- a/res/layout/settings.xml +++ b/res/layout/settings.xml @@ -446,7 +446,7 @@ android:orientation="vertical" > Date: Sun, 20 Jul 2014 13:27:31 +0200 Subject: [PATCH 10/12] Fix all lint errors 'Error: "STRING" is translated here but not found in default locale [ExtraTranslation]' --- res/values-ar/strings.xml | 10 ---------- res/values-es/strings.xml | 2 -- res/values-fr/strings.xml | 3 +-- res/values-it/strings.xml | 3 +-- res/values-ru/strings.xml | 2 -- res/values-tr/strings.xml | 5 +---- res/values-zh-rCN/strings.xml | 1 - res/values-zh-rTW/strings.xml | 2 -- 8 files changed, 3 insertions(+), 25 deletions(-) diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml index 90a36c6..d68e32f 100644 --- a/res/values-ar/strings.xml +++ b/res/values-ar/strings.xml @@ -34,26 +34,16 @@ تفعيل ملفات تعريف الارتباط استيراد العلامات المرجعية من المتصفح حجم النص - الإعدادات المتقدمة (مستحسن) - (مواقع قد تبدو غريبة) محرك البحث بحث استخدام إطار عرض واسع تحميل الصفحات في نظرة عامة استعادة علامات التبويب المفقودة عند البدء - السجل - إضافة إلى العلامات المرجعية - العلامات المرجعية - مشاركة - الإعدادات - علامة تبويب التخفي - علامة تبويب جديدة (لا يوجد مخزون في المتصفح) (دعم مخزون المتصفح ) إخفاء شريط الحالة أثناء التصفح مسح ملفات تعريف الارتباط - تفعيل إيماءات الأمام و الخلف ماذا تريد أن تفعل مع هذه الصورة؟ تحميل فتح diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 15cd2f6..d15aae3 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -31,7 +31,6 @@ Ajustes Ruta de descargas Ajustes avanzados - Habilitar gestos de Atrás y Adelante Código fuente Licencia github.com/anthonycr/Lightning-Browser @@ -47,7 +46,6 @@ Importar marcadores Tamaño de la tipografía (Recomendado) - (Puede causar visualización extraña) Motor de búsquedas Buscar URL Personalizada diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 4f69a37..78eb107 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -16,10 +16,9 @@ Activer le mode plein écran Activer JavaScript Historique - Aj. favoris Favoris Partager Paramètres Onglet incognito Nouvel onglet - \ No newline at end of file + diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index a532e98..4d4a515 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -18,11 +18,10 @@ Enable fullscreen mode Enable JavaScript History - Aggiungi ai preferiti Segnalibri Azione Impostazioni Incognito tab New tab - \ No newline at end of file + diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index a87283c..edebe04 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -43,7 +43,6 @@ Импорт закладок Размер текста рекомендуется - сайты могут быть искажены Поисковая система Поиск Широкий вид @@ -53,7 +52,6 @@ браузер обнаружен Без строки состояния Очистить cookies - Жесты назад и вперёд Выберите действие для изображения Загрузить Открыть diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 36c6d69..292090b 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -34,17 +34,14 @@ Çerezleri etkinleştirme Tarayıcı yer imlerini içe aktarma Metin boyutu - Gelişmi Ayarlar Merhaba dünya! (Önerilen) - (Web siteleri garip görünebilir) Arama Motoru Arama Geniş görünüm kullanma Genel bakış modunda sayfaları yükleme Kaybolan pencereleri başlangıçta yükleme Geçmiş - Yer imi ekle Yer imleri Paylaş Ayarlar @@ -53,4 +50,4 @@ (Hiçbir stok tarayıcı tespit edilemedi) (Desteklenen stok tarayıcı tespit edildi) - \ No newline at end of file + diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index fb4acd5..65e2ca9 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -46,7 +46,6 @@ 从浏览器中导入书签 页面文本尺寸 (推荐) - (可能导致部分网页排版混乱) 搜索引擎 搜索 使用宽视图 diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml index 62fca8f..439e4d6 100644 --- a/res/values-zh-rTW/strings.xml +++ b/res/values-zh-rTW/strings.xml @@ -31,7 +31,6 @@ 偏好設定 下載資料夾位置 進階設定 - 啟動上一頁、下一頁手勢 原始碼 版權資訊 github.com/anthonycr/Lightning-Browser @@ -47,7 +46,6 @@ 從其它瀏覽器匯入書籤 文字尺寸 (建議) - (網站看起來可能會有點古怪) 搜尋引擎 搜尋 自定 URL From 371a8b0ef6ebd85e2460b15f030506ab7e76aa0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Sun, 20 Jul 2014 15:57:59 +0200 Subject: [PATCH 11/12] Add windows version of setup-ant.sh file --- setup-ant.bat | 16 ++++++++++++++++ setup-ant.sh | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 setup-ant.bat diff --git a/setup-ant.bat b/setup-ant.bat new file mode 100644 index 0000000..1f5cc06 --- /dev/null +++ b/setup-ant.bat @@ -0,0 +1,16 @@ +@ECHO OFF +SETLOCAL enabledelayedexpansion + +SET "target=android-19" + +REM Update ant setup in project and all sub-projects +SET "pattern=project.properties" +FOR /R "./external/" %%# in (*.properties) DO ( + ECHO %%~nx# | FIND "%pattern%" 1>NUL && ( + SET current_dir=%~d0%%~p# + SET current_dir=!current_dir:\=/! + ECHO Updating ant setup in "!current_dir!" + CALL android update lib-project -t %target% -p "!current_dir!" + ) +) +CALL android update project -p . --subprojects -t %target% --name Lightning diff --git a/setup-ant.sh b/setup-ant.sh index 2a0965e..528e07c 100755 --- a/setup-ant.sh +++ b/setup-ant.sh @@ -2,8 +2,9 @@ target="android-19" +# Update ant setup in project and all sub-projects for f in `find external/ -name project.properties`; do -projectdir=`dirname $f` + projectdir=`dirname $f` echo "Updating ant setup in $projectdir:" android update lib-project -p $projectdir -t $target done From f8c1506a8a97599975910da36c49e36a5c002af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Tue, 22 Jul 2014 21:05:49 +0200 Subject: [PATCH 12/12] Update target in properties and scripts to match value from AndroidManifest.xml; make exception for Travis --- project.properties | 2 +- setup-ant.bat | 2 +- setup-ant.sh | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/project.properties b/project.properties index bd48a11..39db97f 100644 --- a/project.properties +++ b/project.properties @@ -11,5 +11,5 @@ proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-19 +target=android-20 android.library.reference.1=external/netcipher/libnetcipher diff --git a/setup-ant.bat b/setup-ant.bat index 1f5cc06..84311d1 100644 --- a/setup-ant.bat +++ b/setup-ant.bat @@ -1,7 +1,7 @@ @ECHO OFF SETLOCAL enabledelayedexpansion -SET "target=android-19" +SET "target=android-20" REM Update ant setup in project and all sub-projects SET "pattern=project.properties" diff --git a/setup-ant.sh b/setup-ant.sh index 528e07c..a8011a8 100755 --- a/setup-ant.sh +++ b/setup-ant.sh @@ -1,6 +1,11 @@ #!/bin/sh -target="android-19" +target="android-20" + +# Travis doesn't support android-20 yet +if [ -n "$TRAVIS" ]; then + target="android-19"; +fi # Update ant setup in project and all sub-projects for f in `find external/ -name project.properties`; do