Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
language: android
jdk: oraclejdk8

env:
global:
- ANDROID_TARGET=android-22
- ANDROID_ABI=armeabi-v7a

android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- tools
- platform-tools

# The BuildTools version used by your project
- build-tools-23.0.3

# The SDK version used to compile your project
# TODO: why is this here explicitly in addition to $ANDROID_TARGET below
- android-23

# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository

# The SDK version used to compile your project
- $ANDROID_TARGET

# Specify at least one system image,
# if you need to run emulator(s) during your tests.
# The line should look like this after interpolation:
# - sys-img-armeabi-v7a-android-22
- sys-img-${ANDROID_ABI}-${ANDROID_TARGET}

licenses:
- 'android-sdk-license-.+'

before_install:
# Accept sdk licenses
- yes | sdkmanager "platforms;android-29"

# Get gradle
- chmod +x gradlew
- wget http://services.gradle.org/distributions/gradle-5.3-bin.zip
- unzip -qq gradle-5.3-bin.zip
- export GRADLE_HOME=$PWD/gradle-5.3
- export PATH=$GRADLE_HOME/bin:$PATH

# Build the project
- gradle -v

# Start the emulator
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &

# The app will now automatically be installed and tested via
# the command `gradle connectedCheck`
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ String getCityName(){
String getProvinceName(){
return this.province;
}

String correctedMethod() {
return "Hello";
}

@Override
public int compareTo(City o) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class MainActivity extends AppCompatActivity {
ArrayList<City> cityDataList;

CustomList customList;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down