Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1382 from joschahenningsen/actions
Browse files Browse the repository at this point in the history
Migrate to GitHub actions
  • Loading branch information
joschahenningsen committed Apr 9, 2021
2 parents eba6f50 + aca56bf commit 059820f
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 68 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, actions ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Build
run: ./gradlew build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
!.idea/inspectionProfiles/
!.idea/vcs.xml
*.apk
gradlew
/app/release/
fastlane/report.xml

Expand Down
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'de.aaschmid.cpd' version '3.1'
}
apply plugin: "io.gitlab.arturbosch.detekt"
// apply plugin: "io.gitlab.arturbosch.detekt"
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
Expand All @@ -12,7 +12,7 @@ apply plugin: 'com.google.firebase.crashlytics'
apply from: '../gradle/scripts/pmd.gradle'
apply from: '../gradle/scripts/jacoco.gradle'
apply from: '../gradle/scripts/checkstyle.gradle'
apply from: '../gradle/scripts/detekt.gradle'
// apply from: '../gradle/scripts/detekt.gradle'
apply from: '../gradle/scripts/testLogging.gradle'

android {
Expand Down Expand Up @@ -188,7 +188,7 @@ dependencies {
testImplementation 'com.android.support.test:rules:1.0.2'
testImplementation 'com.android.support.test:runner:1.0.2'
testImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
testImplementation "org.robolectric:robolectric:4.4"
testImplementation "org.robolectric:robolectric:4.5.1"

// TicketSale
implementation 'com.stripe:stripe-android:6.1.2'
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/de/tum/in/tumcampusapp/App.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.tum.`in`.tumcampusapp

import android.app.Application
import android.content.res.Resources
import android.os.StrictMode
import androidx.appcompat.app.AppCompatDelegate
import com.google.firebase.crashlytics.FirebaseCrashlytics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.activity_setup_eduroam.*
import org.jetbrains.anko.appcompat.v7.Appcompat
import org.jetbrains.anko.defaultSharedPreferences
import org.jetbrains.anko.notificationManager
import java.util.concurrent.ExecutionException
Expand All @@ -66,8 +65,8 @@ class SettingsFragment : PreferenceFragmentCompat(), Preference.OnPreferenceClic
}

override fun onCreatePreferences(
savedInstanceState: Bundle?,
rootKey: String?
savedInstanceState: Bundle?,
rootKey: String?
) {
setPreferencesFromResource(R.xml.settings, rootKey)
populateNewsSources()
Expand Down Expand Up @@ -134,8 +133,8 @@ class SettingsFragment : PreferenceFragmentCompat(), Preference.OnPreferenceClic
}

private fun loadNewsSourceIcon(
preference: Preference,
url: String
preference: Preference,
url: String
) {
compositeDisposable += Single
.fromCallable { Picasso.get().load(url).get() }
Expand All @@ -157,8 +156,8 @@ class SettingsFragment : PreferenceFragmentCompat(), Preference.OnPreferenceClic
}

override fun onSharedPreferenceChanged(
sharedPrefs: SharedPreferences,
key: String?
sharedPrefs: SharedPreferences,
key: String?
) {
if (key == null) {
return
Expand Down Expand Up @@ -268,7 +267,7 @@ class SettingsFragment : PreferenceFragmentCompat(), Preference.OnPreferenceClic
}

override fun onPreferenceClick(
preference: Preference?
preference: Preference?
): Boolean {
when (preference?.key) {
SETUP_EDUROAM -> startActivity(Intent(context, SetupEduroamActivity::class.java))
Expand Down Expand Up @@ -334,7 +333,7 @@ class SettingsFragment : PreferenceFragmentCompat(), Preference.OnPreferenceClic
private const val SETUP_EDUROAM = "card_eduroam_setup"

fun newInstance(
key: String?
key: String?
) = SettingsFragment().apply { arguments = bundleOf(ARG_PREFERENCE_ROOT to key) }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.ImageView
import androidx.core.content.ContextCompat
import com.github.mikephil.charting.charts.Chart
import com.github.mikephil.charting.components.Legend
import com.github.mikephil.charting.components.LegendEntry
import com.github.mikephil.charting.data.*
Expand Down Expand Up @@ -162,7 +161,7 @@ class GradesFragment : FragmentForAccessingTumOnline<ExamList>(
setFitBars(true)

// only label grades that are associated with at least one grade
data.setValueFormatter(object: ValueFormatter() {
data.setValueFormatter(object : ValueFormatter() {
override fun getFormattedValue(value: Float): String? {
if (value > 0.0)
return value.toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ data class Exam(
"4,7" to R.color.grade_4_7,
"4,8" to R.color.grade_4_8,
"4,9" to R.color.grade_4_9,
"5,0" to R.color.grade_5_0,
"5,0" to R.color.grade_5_0
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ class StartupActivity : BaseActivity(R.layout.activity_startup) {
}

override fun onRequestPermissionsResult(
requestCode: Int,
permissions: Array<String>,
grantResults: IntArray
requestCode: Int,
permissions: Array<String>,
grantResults: IntArray
) {
openMainActivityIfInitializationFinished()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.content.Context
import android.content.SharedPreferences
import android.content.SharedPreferences.Editor
import android.preference.PreferenceManager
import android.util.Log
import androidx.recyclerview.widget.DiffUtil
import de.tum.`in`.tumcampusapp.R
import de.tum.`in`.tumcampusapp.component.other.navigation.NavDestination
Expand All @@ -19,9 +18,9 @@ import de.tum.`in`.tumcampusapp.utils.Utils
* @param settingsPrefix Preference key prefix used for all preferences belonging to that card
*/
abstract class Card(
val cardType: Int,
protected var context: Context,
val settingsPrefix: String = ""
val cardType: Int,
protected var context: Context,
val settingsPrefix: String = ""
) : Comparable<Card> {

// Settings for showing this card on start page or as notification
Expand Down Expand Up @@ -127,8 +126,8 @@ abstract class Card(
protected abstract fun discard(editor: Editor)

class DiffCallback(
private val oldList: List<Card>,
private val newList: List<Card>
private val oldList: List<Card>,
private val newList: List<Card>
) : DiffUtil.Callback() {

override fun getOldListSize() = oldList.size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package de.tum.`in`.tumcampusapp.component.ui.transportation
import android.animation.ValueAnimator
import android.content.Context
import android.content.res.ColorStateList
import android.graphics.Color
import android.os.Handler
import android.view.Gravity
import android.view.LayoutInflater
Expand Down

0 comments on commit 059820f

Please sign in to comment.