Browse Source

Merge pull request #86 from yusufsahinhamza/fix-travis-ci

Fix Travis CI including current errors
duke
Duke Leto 4 years ago
committed by GitHub
parent
commit
284255a467
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      .travis.yml
  2. 2
      README.md
  3. 3
      app/src/main/java/org/myhush/silentdragon/MainActivity.kt
  4. 4
      app/src/main/res/values-bg/strings.xml
  5. 2
      app/src/main/res/values-de/strings.xml
  6. 4
      app/src/main/res/values-el/strings.xml
  7. 4
      app/src/main/res/values-fa/strings.xml
  8. 2
      app/src/main/res/values-fi/strings.xml
  9. 4
      app/src/main/res/values-fil/strings.xml
  10. 4
      app/src/main/res/values-fr/strings.xml
  11. 6
      app/src/main/res/values-hu/strings.xml
  12. 6
      app/src/main/res/values-in/strings.xml
  13. 6
      app/src/main/res/values-it/strings.xml
  14. 6
      app/src/main/res/values-lv/strings.xml
  15. 4
      app/src/main/res/values-pl/strings.xml
  16. 6
      app/src/main/res/values-pt/strings.xml
  17. 2
      app/src/main/res/values-ro/strings.xml
  18. 5
      app/src/main/res/values-ru/strings.xml
  19. 6
      app/src/main/res/values-sv/strings.xml
  20. 25
      tools/android-wait-for-emulator.sh

29
.travis.yml

@ -1,7 +1,28 @@
language: android
dist: trusty
jdk: oraclejdk8
env:
global:
- ANDROID_TARGET=android-22
- ANDROID_ABI=armeabi-v7a
android:
components:
- build-tools-26.0.2
- android-26
- extra
- tools
- platform-tools
- build-tools-28.0.3
- android-28
- $ANDROID_TARGET
- extra-android-m2repository
- sys-img-${ANDROID_ABI}-${ANDROID_TARGET}
before_script:
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 100M
- emulator -avd test -no-window &
- bash ./tools/android-wait-for-emulator.sh
- adb shell input keyevent 82 &
script:
- bash ./gradlew build
- bash ./gradlew test -x lint --stacktrace

2
README.md

@ -84,7 +84,7 @@ The `keytool` command can be used, for example:
* Set the Key Store Name to `silent_dragon_keystore.jks` and the path to that of the project, create a password for the keystore path, a Key alias, and a key password. The store password and key password should be the same. Fill out some basic organization information and click Ok.
* On the next screen make sure the build variant "release" is selected and click Finish.
### Preparing properties file
### Preparing a properties file
Copy `secrets.properties` file from `examples` folder and paste it to the projects main directory.
Fill store_file_location, key_alias, key_password and store_password when you created the release keystore.

3
app/src/main/java/org/myhush/silentdragon/MainActivity.kt

@ -7,6 +7,7 @@ import android.app.Activity
import android.app.AlertDialog
import android.content.*
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.os.StrictMode
@ -70,7 +71,7 @@ class MainActivity : AppCompatActivity(),
btnHelp.setOnClickListener {
val dialogBuilder = AlertDialog.Builder(this)
dialogBuilder.setMessage(Html.fromHtml(resources.getString(R.string.help_text), HtmlCompat.FROM_HTML_MODE_LEGACY))
dialogBuilder.setMessage(if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) Html.fromHtml(resources.getString(R.string.help_text), HtmlCompat.FROM_HTML_MODE_LEGACY) else Html.fromHtml(resources.getString(R.string.help_text)))
.setNegativeButton(resources.getString(R.string.ok), DialogInterface.OnClickListener {
dialog, id -> dialog.cancel()
})

4
app/src/main/res/values-bg/strings.xml

@ -21,6 +21,8 @@
<string name="past_transactions">Предишни транзакции</string>
<string name="or">OR</string>
<string name="reconnect">Свържи се отново</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>
@ -131,4 +133,4 @@
<string name="title_activity_settings">Настройки</string>
<string name="title_activity_about">Относно</string>
</resources>
</resources>

2
app/src/main/res/values-de/strings.xml

@ -26,6 +26,8 @@
<string name="past_transactions">letzte Transaktionen</string>
<string name="or">OR</string>
<string name="reconnect">Wiederverbinden</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>

4
app/src/main/res/values-el/strings.xml

@ -23,6 +23,8 @@
<string name="past_transactions">Προηγούμενες συναλλαγές</string>
<string name="or">Η</string>
<string name="reconnect">Επανασύνδεση</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>
@ -133,4 +135,4 @@
<string name="title_activity_settings">Ρυθμίσεις</string>
<string name="title_activity_about">Σχετικά με</string>
</resources>
</resources>

4
app/src/main/res/values-fa/strings.xml

@ -21,6 +21,8 @@
<string name="past_transactions">تراکنش های گذشته</string>
<string name="or">یا</string>
<string name="reconnect">اتصال دوباره</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon|سایلنت دراگون</string>
@ -136,4 +138,4 @@
<string name="title_activity_settings">تنظیمات</string>
<string name="title_activity_about">درباره</string>
</resources>
</resources>

2
app/src/main/res/values-fi/strings.xml

@ -26,6 +26,8 @@
<string name="past_transactions">Aiemmat Tapahtumat</string>
<string name="or">Tai</string>
<string name="reconnect">Yhdistä Uudelleen</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>

4
app/src/main/res/values-fil/strings.xml

@ -22,6 +22,8 @@
<string name="past_transactions">Mga Nakaraang Transaksyon</string>
<string name="or">O</string>
<string name="reconnect">Kumonekta Muli</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>
@ -132,4 +134,4 @@
<string name="title_activity_settings">Settings</string>
<string name="title_activity_about">About</string>
</resources>
</resources>

4
app/src/main/res/values-fr/strings.xml

@ -21,7 +21,9 @@
<string name="past_transactions">Historique des transactions</string>
<string name="or">OU</string>
<string name="reconnect">Se reconnecter</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity -->
<string name="app_name">SilentDragon</string>
<string name="no_connection">Aucune connexion</string>

6
app/src/main/res/values-hu/strings.xml

@ -22,7 +22,9 @@
<string name="past_transactions">Korábbi tranzakciók</string>
<string name="or">vagy</string>
<string name="reconnect">Ójrakapcsolódás</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>
<string name="no_connection">Nincs kapcsolat</string>
@ -132,4 +134,4 @@
<string name="title_activity_settings">Beállítások</string>
<string name="title_activity_about">Infó</string>
</resources>
</resources>

6
app/src/main/res/values-in/strings.xml

@ -21,6 +21,8 @@
<string name="past_transactions">Transaksi Yang lalu</string>
<string name="or">OR</string>
<string name="reconnect">Menghubungkan Ulang</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>
@ -115,7 +117,7 @@
<string name="error_sending_transaction">Pengriman Transaksi Error!</string>
<string name="memo_field_over_512">Bidang Memo Terlalu Panjang! Paling Banyak 512 Bytes.</string>
<string name="more_than_shielded_address">%1$s %2$s lebih dari saldo dalam alamat terlindung Anda. Tx ini harus dikirim dari alamat transparan, dan tidak akan bersifat pribadi.\n\nApakah Anda benar-benar yakin?</string>
<string name="max_spend_in_a_single_tx">Tidak bisa menghabiskan lebih dari %1$d %2$ dalam satu Tx</string>
<string name="max_spend_in_a_single_tx">Tidak bisa menghabiskan lebih dari %1$d %2$s dalam satu Tx</string>
<string name="reply_to">Balas Kepada</string>
<!-- content_send -->
@ -131,4 +133,4 @@
<string name="title_activity_settings">Pengaturan</string>
<string name="title_activity_about">Tentang</string>
</resources>
</resources>

6
app/src/main/res/values-it/strings.xml

@ -23,7 +23,9 @@
<string name="past_transactions">Transazioni Recenti</string>
<string name="or">OPPURE</string>
<string name="reconnect">Riconnetti</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>
<string name="no_connection">Nessuna Connessione</string>
@ -137,4 +139,4 @@
<string name="title_activity_settings">Impostazioni</string>
<string name="title_activity_about">About</string>
</resources>
</resources>

6
app/src/main/res/values-lv/strings.xml

@ -21,7 +21,9 @@
<string name="past_transactions">Iepriekšējie darījumi</string>
<string name="or">VAI</string>
<string name="reconnect">Atkārtoti izveidot savienojumu</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>
<string name="no_connection">Nav savienojuma</string>
@ -131,4 +133,4 @@
<string name="title_activity_settings">Iestātījumi</string>
<string name="title_activity_about">Par</string>
</resources>
</resources>

4
app/src/main/res/values-pl/strings.xml

@ -26,6 +26,8 @@ TADDR (adres transparentny)
<string name="past_transactions">Poprzednie tranzakcje</string>
<string name="or">LUB</string>
<string name="reconnect">Połącz ponownie</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>
@ -140,4 +142,4 @@ TADDR (adres transparentny)
<string name="title_activity_settings">Ustawienia</string>
<string name="title_activity_about">O aplikacji</string>
</resources>
</resources>

6
app/src/main/res/values-pt/strings.xml

@ -23,7 +23,9 @@
<string name="past_transactions">Últimas transacções</string>
<string name="or">OU</string>
<string name="reconnect">Reconectar</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>
<string name="no_connection">Sem ligação</string>
@ -132,4 +134,4 @@
<string name="title_activity_settings">Opções</string>
<string name="title_activity_about">Sobre</string>
</resources>
</resources>

2
app/src/main/res/values-ro/strings.xml

@ -22,6 +22,8 @@
<string name="past_transactions">Tranzacţii anterioare</string>
<string name="or">ori</string>
<string name="reconnect">Reconectare</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>

5
app/src/main/res/values-ru/strings.xml

@ -24,7 +24,8 @@
<string name="past_transactions">Прошедшие транзакции</string>
<string name="or">Или</string>
<string name="reconnect">Переподключиться</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">ТихийДракон</string>
@ -135,7 +136,7 @@
<string name="cant_send_a_memo_to_a_taddr"> Невозможно отправить мемо на т-адрес</string>
<string name="error_sending_transaction"> Ошибка в отправке транзакции!</string>
<string name="memo_field_over_512"> Поле мемо слишком длинное! Должно быть менее 512 байт.</string>
<string name="more_than_shielded_address"> Сумма %1$d %2$s больше, чем баланс на Вашем затененном адресе. Данная транзакция будет отправлена с т-адреса и не будет скрытой. Вы абсолютно уверены? </string>
<string name="more_than_shielded_address"> Сумма %1$s %2$s больше, чем баланс на Вашем затененном адресе. Данная транзакция будет отправлена с т-адреса и не будет скрытой. Вы абсолютно уверены? </string>
<string name="max_spend_in_a_single_tx"> Невозможно отправить больше, чем %1$d %2$s в одной транзакции"</string>
<string name="reply_to"> Ответить</string>

6
app/src/main/res/values-sv/strings.xml

@ -22,7 +22,9 @@
<string name="past_transactions">tidigare transaktioner</string>
<string name="or">eller</string>
<string name="reconnect">återanslut</string>
<string name="help">Help</string>
<string name="help_text">This application does remote control for your full node.&lt;br>&lt;br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.&lt;br>&lt;br>After your node is synced, go to &lt;b>Apps -> Connect Mobile App&lt;/b> to view the connection QR Code, which you can scan from this app for connect SilentDragon.</string>
<!-- MainActivity.kt -->
<string name="app_name">SilentDragon</string>
<string name="no_connection">ingen anslutning</string>
@ -132,4 +134,4 @@
<string name="title_activity_settings">inställningar</string>
<string name="title_activity_about">om</string>
</resources>
</resources>

25
tools/android-wait-for-emulator.sh

@ -0,0 +1,25 @@
#!/bin/bash
# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain
set +e
bootanim=""
failcounter=0
timeout_in_sec=360
until [[ "$bootanim" =~ "stopped" ]]; do
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &`
if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline"
|| "$bootanim" =~ "running" ]]; then
let "failcounter += 1"
echo "Waiting for emulator to start"
if [[ $failcounter -gt timeout_in_sec ]]; then
echo "Timeout ($timeout_in_sec seconds) reached; failed to start emulator"
exit 1
fi
fi
sleep 1
done
echo "Emulator is ready"
Loading…
Cancel
Save