This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.emil.android.util; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.telephony.TelephonyManager; | |
/** | |
* Check device's network connectivity and speed | |
* @author emil http://stackoverflow.com/users/220710/emil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
apply plugin: 'digital.wup.android-maven-publish' | |
android { | |
compileSdkVersion 27 | |
buildToolsVersion '27.0.3' | |
defaultConfig { | |
minSdkVersion 21 | |
targetSdkVersion 27 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p $HOME/android-sdk-dl | |
if test ! -e $HOME/android-sdk-dl/sdk-tools.zip; then | |
curl https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip > $HOME/android-sdk-dl/sdk-tools.zip | |
fi | |
unzip -qq -n $HOME/android-sdk-dl/sdk-tools.zip -d $ANDROID_HOME | |
# Install or update Android SDK components (will not do anything if already up to date thanks to the cache mechanism) | |
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'tools' > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: objective-c | |
osx_image: xcode9.4 | |
cache: | |
- directories: | |
# Gradle dependencies | |
- $HOME/.gradle/caches/ | |
- $HOME/.gradle/wrapper/ | |
# Kotlin native | |
- $HOME/.konan/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: objective-c | |
osx_image: xcode9.4 | |
script: | |
- ./gradlew clean build | |
cache: | |
- directories: | |
# Gradle dependencies | |
- $HOME/.gradle/caches/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: objective-c | |
osx_image: xcode9.4 | |
script: | |
- ./gradlew clean build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p $HOME/android-sdk-dl | |
if test ! -e $HOME/android-sdk-dl/sdk-tools.zip; then | |
curl https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip > $HOME/android-sdk-dl/sdk-tools.zip | |
fi | |
unzip -qq -n $HOME/android-sdk-dl/sdk-tools.zip -d $ANDROID_HOME | |
# Install or update Android SDK components (will not do anything if already up to date thanks to the cache mechanism) | |
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'tools' > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
- ANDROID_HOME=$HOME/android-sdk JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: objective-c | |
osx_image: xcode9.4 | |
before_cache: | |
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | |
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ | |
cache: | |
- directories: | |
# Android SDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES | |
defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES | |
echo "Setting up Xcode and Simulator has been completed." | |
echo "Please restart the Xcode and the Simulators" |