Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Parra Serna committed Feb 7, 2022
0 parents commit d7498c7
Show file tree
Hide file tree
Showing 64 changed files with 1,762 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
51 changes: 51 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
}

android {
compileSdk 32

defaultConfig {
applicationId "es.juaparser.kanbanboard"
minSdk 24
targetSdk 32
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
}
}

dependencies {

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package es.juaparser.kanbanboard

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("es.juaparser.kanbanboard", appContext.packageName)
}
}
30 changes: 30 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="es.juaparser.kanbanboard">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.KanbanBoard">
<activity
android:name=".ui.board.BoardActivity"
android:exported="false"
android:label="@string/title_activity_board"
android:theme="@style/Theme.KanbanBoard.NoActionBar" />

<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
35 changes: 35 additions & 0 deletions app/src/main/java/es/juaparser/kanbanboard/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package es.juaparser.kanbanboard

import android.os.Bundle
import com.google.android.material.bottomnavigation.BottomNavigationView
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.findNavController
import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.setupActionBarWithNavController
import androidx.navigation.ui.setupWithNavController
import es.juaparser.kanbanboard.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {

private lateinit var binding: ActivityMainBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)

val navView: BottomNavigationView = binding.navView

val navController = findNavController(R.id.nav_host_fragment_activity_main)
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
val appBarConfiguration = AppBarConfiguration(
setOf(
R.id.navigation_explore, R.id.navigation_local
)
)
setupActionBarWithNavController(navController, appBarConfiguration)
navView.setupWithNavController(navController)
}
}
16 changes: 16 additions & 0 deletions app/src/main/java/es/juaparser/kanbanboard/model/BoardState.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package es.juaparser.kanbanboard.model

/*
* Enumerado BoardState, el cual identificará a qué columna del tablero corresponde cada issue.
* BACKLOG: Columna backlog, issues abiertas pero no empezadas.
* NEXT: Columna next, issues marcadas para comenzar en la siguiente iteración.
* DOING: Columna doing, issues en progreso.
* DONE: Columna done, issues finalizadas y listas para pruebas.
* */

enum class BoardState {
BACKLOG,
NEXT,
DOING,
DONE
}
20 changes: 20 additions & 0 deletions app/src/main/java/es/juaparser/kanbanboard/model/Issue.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package es.juaparser.kanbanboard.model

import java.util.*

/*
* Modelo issue, almacenará la información de todos los issues del tablero kanban asociado a un repo
* title: String con el título del issue
* date: Date con la fecha de creación del issue
* number: Integer con el identificador del issue
* comments: Número de comentarios en el issue
* type: Enumerado BoardState para identificar a cual columna del tablero corresponde el issue
* */

data class Issue(
var title: String,
var date: Date,
var number: String,
var comments: Int,
var type: BoardState
)
20 changes: 20 additions & 0 deletions app/src/main/java/es/juaparser/kanbanboard/model/Repo.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package es.juaparser.kanbanboard.model

import java.util.*

/*
* Modelo Repo, almacenará la información de todos los repositorios del usuario
* name: String con el nombre del repositorio
* author: String con el autor del repositorio
* link: Enlace al repositorio en Github
* created: Fecha de creación del repositorio
* issues: Lista de issues del tablero kanban asociado al repositorio
* */

data class Repo(
var name: String,
var author: String,
var link: String,
var created: Date,
var issues: MutableList<Issue>
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package es.juaparser.kanbanboard.ui.board

import android.os.Bundle
import com.google.android.material.floatingactionbutton.FloatingActionButton
import com.google.android.material.snackbar.Snackbar
import com.google.android.material.tabs.TabLayout
import androidx.viewpager.widget.ViewPager
import androidx.appcompat.app.AppCompatActivity
import es.juaparser.kanbanboard.databinding.ActivityBoardBinding

class BoardActivity : AppCompatActivity() {

private lateinit var binding: ActivityBoardBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

binding = ActivityBoardBinding.inflate(layoutInflater)
setContentView(binding.root)

val sectionsPagerAdapter = SectionsPagerAdapter(this, supportFragmentManager)
val viewPager: ViewPager = binding.viewPager
viewPager.adapter = sectionsPagerAdapter
val tabs: TabLayout = binding.tabs
tabs.setupWithViewPager(viewPager)

}
}
Loading

0 comments on commit d7498c7

Please sign in to comment.