From 6e0af0c6089502065a7a32d664e90594425cd4fa Mon Sep 17 00:00:00 2001 From: alexfilbert Date: Wed, 11 Mar 2020 16:39:34 -0600 Subject: [PATCH 1/5] Create .travis.yml --- .travis.yml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..e52c153e --- /dev/null +++ b/.travis.yml @@ -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` From 775d57592393757adfda7828828a6569de51f677 Mon Sep 17 00:00:00 2001 From: alexfilbert Date: Wed, 11 Mar 2020 16:40:10 -0600 Subject: [PATCH 2/5] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e52c153e..d602da97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ before_install: # Get gradle - chmod +x gradlew - - wget http://services.gradle.org/distributions/gradle-5.3-bin.zip + - wget https://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 From 8518120290668c18dd68b00425dac6f65f07aa1a Mon Sep 17 00:00:00 2001 From: alexfilbert Date: Wed, 11 Mar 2020 16:43:37 -0600 Subject: [PATCH 3/5] Create .gitignore --- .gitignore | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..56cc6425 --- /dev/null +++ b/.gitignore @@ -0,0 +1,85 @@ +# Built application files +*.apk +*.aar +*.ap_ +*.aab + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ +# Uncomment the following line in case you need and you don't have the release build type files in your app +# release/ + +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation/ + +# Android Studio captures folder +captures/ + +# IntelliJ +*.iml +.idea/workspace.xml +.idea/tasks.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +# Android Studio 3 in .gitignore file. +.idea/caches +.idea/modules.xml +# Comment next line if keeping position of elements in Navigation Editor is relevant for you +.idea/navEditor.xml + +# Keystore files +# Uncomment the following lines if you do not want to check your keystore files in. +#*.jks +#*.keystore + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild +.cxx/ + +# Google Services (e.g. APIs or Firebase) +# google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md + +# Version control +vcs.xml + +# lint +lint/intermediates/ +lint/generated/ +lint/outputs/ +lint/tmp/ +# lint/reports/ From 886ed50bbd9b11229e4d314ae8f78f34b9102122 Mon Sep 17 00:00:00 2001 From: Yash-Bhandari Date: Mon, 22 Mar 2021 13:15:00 -0600 Subject: [PATCH 4/5] added test for adding numbers --- .../java/com/example/simpleparadox/listycity/CityList.java | 4 ++++ .../com/example/simpleparadox/listycity/CityListTest.java | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/app/src/main/java/com/example/simpleparadox/listycity/CityList.java b/app/src/main/java/com/example/simpleparadox/listycity/CityList.java index 6da242f3..86700d7a 100644 --- a/app/src/main/java/com/example/simpleparadox/listycity/CityList.java +++ b/app/src/main/java/com/example/simpleparadox/listycity/CityList.java @@ -77,4 +77,8 @@ public void delete(City city) { public int countCities() { return cities.size(); } + + public static int addNums(int a, int b){ + return 0; + } } diff --git a/app/src/test/java/com/example/simpleparadox/listycity/CityListTest.java b/app/src/test/java/com/example/simpleparadox/listycity/CityListTest.java index 787eab7e..3e43c2e4 100644 --- a/app/src/test/java/com/example/simpleparadox/listycity/CityListTest.java +++ b/app/src/test/java/com/example/simpleparadox/listycity/CityListTest.java @@ -93,4 +93,9 @@ void testCountCities() { assertEquals(1, cityList.countCities()); } + + @Test + void testAddNums() { + assertEquals(4, CityList.addNums(1, 3)); + } } \ No newline at end of file From ffd0d51f180c4d0baa6c9e7197ab5e96a307b657 Mon Sep 17 00:00:00 2001 From: Yash-Bhandari Date: Mon, 22 Mar 2021 13:24:26 -0600 Subject: [PATCH 5/5] completed addNums function --- .../main/java/com/example/simpleparadox/listycity/CityList.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/simpleparadox/listycity/CityList.java b/app/src/main/java/com/example/simpleparadox/listycity/CityList.java index 86700d7a..30d9b1d5 100644 --- a/app/src/main/java/com/example/simpleparadox/listycity/CityList.java +++ b/app/src/main/java/com/example/simpleparadox/listycity/CityList.java @@ -79,6 +79,6 @@ public int countCities() { } public static int addNums(int a, int b){ - return 0; + return a + b; } }