World-Now

所属分类:土木工程
开发工具:kotlin
文件大小:0KB
下载次数:0
上传日期:2020-05-26 15:06:21
上 传 者sh-1993
说明:  这是一款纯Kotlin制作的新闻应用程序,使用架构组件和Retrofit LIbrary,
(This is a news app made purely in Kotlin and uses the Architecture Components and Retrofit LIbrary,)

文件列表:
.idea/ (0, 2020-05-26)
.idea/codeStyles/ (0, 2020-05-26)
.idea/codeStyles/Project.xml (3203, 2020-05-26)
.idea/compiler.xml (289, 2020-05-26)
.idea/jarRepositories.xml (2051, 2020-05-26)
.idea/misc.xml (1707, 2020-05-26)
.idea/modules.xml (796, 2020-05-26)
.idea/runConfigurations.xml (564, 2020-05-26)
.idea/vcs.xml (180, 2020-05-26)
.travis.yml (534, 2020-05-26)
Contributors.MD (166, 2020-05-26)
LICENSE.txt (10255, 2020-05-26)
app/ (0, 2020-05-26)
app/build.gradle.kts (2048, 2020-05-26)
app/proguard-rules.pro (755, 2020-05-26)
app/src/ (0, 2020-05-26)
app/src/androidTest/ (0, 2020-05-26)
app/src/androidTest/java/ (0, 2020-05-26)
app/src/androidTest/java/com/ (0, 2020-05-26)
app/src/androidTest/java/com/android/ (0, 2020-05-26)
app/src/androidTest/java/com/android/nikhil/ (0, 2020-05-26)
app/src/androidTest/java/com/android/nikhil/worldnow/ (0, 2020-05-26)
app/src/androidTest/java/com/android/nikhil/worldnow/ExampleInstrumentedTest.kt (656, 2020-05-26)
app/src/main/ (0, 2020-05-26)
app/src/main/AndroidManifest.xml (866, 2020-05-26)
app/src/main/kotlin/ (0, 2020-05-26)
app/src/main/kotlin/com/ (0, 2020-05-26)
app/src/main/kotlin/com/android/ (0, 2020-05-26)
app/src/main/kotlin/com/android/nikhil/ (0, 2020-05-26)
app/src/main/kotlin/com/android/nikhil/worldnow/ (0, 2020-05-26)
app/src/main/kotlin/com/android/nikhil/worldnow/base/ (0, 2020-05-26)
app/src/main/kotlin/com/android/nikhil/worldnow/base/BaseActivity.kt (666, 2020-05-26)
app/src/main/kotlin/com/android/nikhil/worldnow/base/BaseViewModel.kt (782, 2020-05-26)
app/src/main/kotlin/com/android/nikhil/worldnow/di/ (0, 2020-05-26)
app/src/main/kotlin/com/android/nikhil/worldnow/di/NewsApplication.kt (499, 2020-05-26)
app/src/main/kotlin/com/android/nikhil/worldnow/di/component/ (0, 2020-05-26)
app/src/main/kotlin/com/android/nikhil/worldnow/di/component/AppComponent.kt (887, 2020-05-26)
... ...

# World Now ![Made in](https://img.shields.io/badge/made%20in-kotlin-blue.svg) ![Pull Request](https://img.shields.io/badge/pull--request-welcome-green.svg) [![Build Status](https://travis-ci.org/nikhilbansal97/World-Now.svg?branch=master)](https://travis-ci.org/nikhilbansal97/World-Now) ![License](https://img.shields.io/badge/license-Apache-orange.svg) Open Source News app for practice and any new people looking to contribute! ### Libraries used * [Architecture Components(ViewModel, LiveData etc.)](https://developer.android.com/topic/libraries/architecture) * [Kotlin Coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html) * [Dagger Andrid](https://dagger.dev/dev-guide/android.html) * [Retrofit](https://square.github.io/retrofit/) * [Realm Database](https://realm.io/docs/kotlin/latest/) ## Project Structure The app is built using `dagger.android` and `Coroutines`. Below is the brief about the packages in the app: * `di` : This package contains all the files related to dependency injection * `component` : It contains the `AppComponent` that is responsible for generating all the code for injection and connecting the modules to injections. * `module` : It contains the Modules that provide the dependencies needed by the app. * `qualifier` : It contains the `ViewModelKey` `@MapKey` responsible for the injection in the `ViewModel` * `base` : It contains the base classes for `Activity` and `ViewModel` * `model` : Contains all the POJOs * `news/list` : Contains the activity, adapter and viewmodel for the news list. * `repository` : Contains the repository for the app. This repository is responsible for loading data from server, caching it and providing it to the viewmodel. * `service` : Interface that is used by reteofit for the API calls. ## Contributions Found a bug? Just create an `issue` and once assigned, start working on it! You feel that the app can be improved somehow? Maybe the architecture can be made more robust so that the app is testable? Feel free to `fork` it and create a `Pull Request`. ### Get an API Key from The Guardian - Open Platform This app makes use of The Guardian - Open Platform to display the news. In order to access this API, you'll need an API Key. Follow these 6 steps to obtain your key: 1. Go to [open-platform.theguardian.com](https://open-platform.theguardian.com/); 2. Scroll down to find [Register for a developer key](https://bonobo.capi.gutools.co.uk/register/developer) and click on it; 3. Fill the form with your name, email and product name (in our case "World Now") and accept the T&C; 4. Check your email inbox, you should have received your key; 5. Open your global `gradle.properties` file in a text editor. It can be found at: * Windows: `C:\Users\YOUR_USERNAME\.gradle\` * Linux: `/home/YOUR_USERNAME/.gradle` * Mac: `/Users/YOUR_USERNAME/.gradle` 6. Add a field `Guardian_ApiKey="ENTER_YOUR_API_KEY_HERE"` in this file then rebuild the project. A `BuildConfig` file with be generated with a field called `ApiKey` because of this line `buildConfigField 'String', "ApiKey", Guardian_ApiKey` that is in the app module [build.gradle(app)](app/build.gradle) file; ### Guidelines * Download and use [SquareAndroid](https://github.com/square/java-code-styles) code style. * Create an issue or comment on an existing one. Wait until it is assigned to you. * Add your name to the Contributors.MD file in format ``` ## Name: Your name ## GitHub: [Your github id](url of the profile) ``` * Fork the repository and clone to your local machine ``` git clone https://github.com/your-username/World-Now.git ``` * Create a separate branch in format `issue-number` ``` git checkout -b issue-number ``` For example, if you are working on `issue-1` ``` git checkout -b issue-1 ``` * Commit and push ``` git add . git commit -m "Commit Message" git push origin branch-name ``` * Create a new pull request from your forked repository * Wait for your PR to be merged and approved. ### License [Apache License](LICENSE.txt) Made with in Kotlin

近期下载者

相关文件


收藏者