Commit 8ef821e8 authored by Dylan Jones's avatar Dylan Jones

begin rewrite

parent 137a8cc3
Pipeline #4783 passed with stages
in 3 minutes and 36 seconds
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
app/release/
# 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/
# Keystore files
*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# OSX
.DS_Store
# Fabric properties
fabric.properties
\ No newline at end of file
*.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
What's Open
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="testRunner" value="PLATFORM" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Kotlin2JvmCompilerArguments">
<option name="jvmTarget" value="1.8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
# Contributing to What's Open
We would love for you to contribute to What's Open and help make it even better
than it is today! As a contributor, here are the guidelines we would like you to
follow:
- [Code of Conduct](#coc)
- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
- [Coding Rules](#rules)
- [Commit Message Guidelines](#commit)
## <a name="coc"></a> Code of Conduct
Help us keep What's Open open and inclusive. Please read and follow the
[GMU Student Code of Conduct][coc].
## <a name="question"></a> Got a Question or Problem?
Please, do not open issues for the general support questions as we want to keep
GitLab issues for bug reports and feature requests. You've got much better
chances of getting your question answered on [Slack Group][slack] where
questions should be asked in their respective channels.
## <a name="issue"></a> Found a Bug?
If you find a bug in the source code, you can help us by
[submitting an issue](#submit-issue) to our [GitLab Repository][gitlab]. Even
better, you can [submit a Merge Request](#submit-pr) with a fix.
## <a name="feature"></a> Missing a Feature?
You can *request* a new feature by [submitting an issue](#submit-issue) to our
GitLab Repository. If you would like to *implement* a new feature, please ensure
an issue already exists to be associated with your commits.
* For any **contribution**, first [open an issue](#submit-issue) and outline your proposal so that it can be
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
and help you to craft the change so that it is successfully accepted into the project.
## <a name="submit"></a> Submission Guidelines
### <a name="submit-issue"></a> Submitting an Issue
Before you submit an issue, please search through open issues, maybe an issue for
your problem already exists and the discussion might inform you of workarounds
readily available.
We want to fix all the issues as soon as possible, but before fixing a bug we
need to reproduce and confirm it. In order to reproduce bugs we may
ask you to describe a use-case that fails to assist in the debugging process.
In GitLab there are issue templates that you can use which paste in a sample
format for you to use.
Check out the following issue for an example: [https://git.gmu.edu/srct/whats-open/issues/31](https://git.gmu.edu/srct/whats-open/issues/31)
You can file new issues by filling out our [new issue form][new-issue].
### <a name="submit-pr"></a> Steps to contribute and submit a Merge Request (MR)
Before you submit your Merge Request (MR) consider the following steps:
* Search [GitLab][merge-request] for an open or closed MR that relates to your
submission. You don't want to duplicate effort.
* Pull the latest commits from GitLab
```sh
git pull
```
* Check into the current development branch:
All new commits are merged into this development branch before going live on
the site in a tagged release (merge into master branch).
```sh
git checkout consolidation
```
* Create a new git branch:
```sh
git checkout -B ##-shortdescription
# Example
git checkout -B 31-contibution-guidelines-proposal
```
All branches need to follow the above convention (`##-shortdescription`) `##`
in this case represents the issue number that your branch is related to. Each
issue has one and only one branch and each branch has one and only one purpose:
to add, modify, or remove a feature/bug from the repo. `shortdescription` is
a few hyphon (`-`) seperated words that consisely describe the branch. This helps people
who may be unfamiliar with the issue number to know at a glance what the branch
* Now you're ready to write your code in your new branch! Make sure to follow
listed [style](#rules) & [commit](#commit) guidelines/rules when contributing
code.
* Unit tests are run at the CI (GitLab-CI) level once you push your code to GitLab.
We do this to ensure that the project builds properly and passes tests. In general,
if you are adding some new piece of code like a function you must **include
appropriate test cases**.
For example if I compose the following function:
```java
int oneplus(int num) {
return num + 1;
}
```
then I would additionally write the following test case:
```java
@Test
void TestOneplus() {
assertEquals(2, oneplus(1));
}
```
* Before you push your code to GitLab it is suggested that you run all unit tests locally.
* [Guide for running local unit tests in Android Studio](https://developer.android.com/training/testing/unit-testing/local-unit-tests.html#run)
* Commit your changes using a descriptive commit message that follows our
[commit message conventions](#commit). Adherence to these conventions is strongly
suggested as it makes it easier to determine what each commit does when, for example,
things break.
```sh
git add --all
git commit # first line is title, two newlines is description
```
* You will need to ask in the slack channel to be added to the GitLab repo. This
step is necessary such that you have the necessary permissions to push up your
branch.
* Push your branch to GitLab:
```sh
git push origin ##-shortdescription
# ex.
git push origin 31-contibution-guidelines-proposal
```
* In GitLab, send a merge request to the current development branch.
* If we suggest changes to your branch then:
* Make the required updates.
* Re-run the unit tests to ensure tests are still passing.
* Rebase your branch and force push to your GitLab repository (this will update
your Merge Request):
```sh
git rebase consolidation -i
git push -f
```
That's it! Thank you for your contribution! :tada:
#### After your merge request is merged
After your merge request is merged, you can safely delete your branch and merge
the changes from the main (upstream) repository:
* Delete the remote branch on GitLab either through the GitLab web UI or your
local shell as follows:
```sh
git push origin --delete ##-shortdescription
# ex.
git push origin --delete 31-contibution-guidelines-proposal
```
* Check out the current development branch:
```sh
git checkout consolidation -f
```
* Delete the local branch:
```sh
git branch -D ##-shortdescription
# ex.
git branch -D 31-contibution-guidelines-proposal
```
* Update your current development branch with the latest upstream version:
```sh
git l --ff upstream consolidation
```
## <a name="rules"></a> Coding Rules
To ensure consistency throughout the source code, keep these rules in mind as you
are working:
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
* This project doesn't have a strict style guide, but [this](https://source.android.com/source/code-style.html) is generally good to follow.
## <a name="commit"></a> Commit Message Guidelines
Consistant commit messages are easier to follow when looking through the **project
history**.
### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**. The
header has a special format that includes a **type** and a **subject**. The **header**
is mandatory.
Layout:
```
<type>: <subject> # this is the <header>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
Sample headers:
```
docs: update change log to beta.5
```
```
fix: need to depend on latest rxjs and zone.js
```
### \<header> Type
Must be one of the following:
* **build**: Changes that affect the build system or external dependencies
(example scopes: gulp, broccoli, npm)
* **ci**: Changes to our gitlab-ci configuration files and scripts
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **perf**: A code change that improves performance
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **style**: Changes that do not affect the meaning of the code (white-space, formatting,
etc.)
* **test**: Adding missing tests or correcting existing tests
### \<header> Subject
The subject contains succinct description of the change.
Sample Subject:
```
add in contributing guide
```
### Body
The body should include a brief description of the changes made in the commit to
provide additional detail.
Sample Body:
```
- Introduce my proposal for CONTRIBUTING.md
- Filled with the whats-open-web contributing guide but contains friendlier language
```
### Footer
The footer should contain any information about **Breaking Changes** (**Breaking
Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
The rest of the commit message is then used for this. and is also the place to
reference GitLab issues that this commit **Closes**.
Sample footers:
```
BREAKING CHANGE: remove outdated dependency from requirements.txt. be sure to
reinstall your packages in order for the project to build.
```
```
Closes #31
```
This "Closes" statement should only be incuded in commits that resolve an issue.
What's nice about the statement itself is that when the commit is merged, the issue
will auto close.
If neither of these situations are the case (breaking changes or issue closing)
then feel free to omit the footer.
[coc]: https://studentconduct.gmu.edu/wp-content/uploads/2011/09/2016-17-Code-of-Student-Conduct.pdf
[gitlab]: https://git.gmu.edu/srct/whats-open
[style-guide]: https://www.python.org/dev/peps/pep-0008/
[slack]:https://srct.slack.com/
[new-issue]:https://git.gmu.edu/srct/whats-open/issues/new
[merge-request]:https://git.gmu.edu/srct/whats-open/merge_requests
\ No newline at end of file
Copyright (c) 2017 SRCT
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
What's Open
===
[![build status](https://git.gmu.edu/srct/whats-open-android/badges/master/build.svg)](https://git.gmu.edu/srct/whats-open-android/commits/master)
Simple Android app that gets data from the [What's Open API](https://whatsopen.gmu.edu/api/) and
displays it in an (ostensibly) pretty way, with some Android-specific bells and whistles.
Contributing
---
What's Open needs all the help it can get. Even if you don't feel
like you can be helpful with the heavily technical aspects,
we definitely need designers and technical writers.
There are many things that can be done with this project (see the "To Do"
section), but sometimes it's the small things that count, so don't be afraid of
contributing just for a spelling mistake.
If you need help at all please contact any SRCT member. We want people to
contribute, so if you are struggling, or just want to learn, then we are willing
to help.
Set Up
---
To get started, you'll need the following installed:
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [Android Studio](https://developer.android.com/studio/index.html)
```bash
git clone https://git.gmu.edu/srct/whats-open-android.git
```
That's about it. From there you can use Android Studio's built in VCS tools,
or continue from the command line.
Some helpful links for using git:
* [Within Android Studio](http://wii.logdown.com/posts/2013/11/15/android-studio-git-tutorial)
* [General Git reference](http://gitref.org/)
Modifying and Deploying Code
---
With the means of testing the app, you can really start contributing.
If you're new to Android development and don't know where to start, I recommend the
[Android guides from Codepath](https://guides.codepath.com/android). They have a large
volume of moderately helpful tutorials on both the Android SDK and some popular libaries.
If you like spending money, [this is also a good starting point](https://www.amazon.com/Android-Programming-Ranch-Guide-Guides/dp/0321804333), though it pretty much just covers
the Android SDK, ignoring lots of very helpful libraries (which are used often by this project).
To Do
---
* Expand offline functionality
* Make app icon
* Add notifications
* Make a widget
## About Mason SRCT
**S**tudent - **R**un **C**omputing and **T**echnology (*SRCT*, pronounced "circuit") is a student organization at George Mason University which enhances student computing at Mason. SRCT establishes and maintains systems which provide specific services for Mason's community.
\ No newline at end of file
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-kapt'
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
apply plugin: 'realm-android'
// apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 29
buildToolsVersion '29.0.2'
defaultConfig {
applicationId "srct.whatsopen"
minSdkVersion 23
targetSdkVersion 29
versionCode 6
versionName '1.0.6'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
ext.enableCrashlytics = false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.astuetz:pagerslidingtabstrip:1.0.1'
implementation 'io.realm:android-adapters:2.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:retrofit:2.6.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.1'
implementation 'com.squareup.retrofit2:converter-gson:2.6.1'
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'