Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version on readme #448

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
90 changes: 86 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# opensrp-client-chw-core
# OpenSRP Client ECAP CHW Core

#OpenSRP client chw core module library
The OpenSRP client chw core module library provides the core functionality for a community health workers (CHW) android client
This library is a fork of OpenSRP client chw core module that provides the core functionality for a community health workers (CHW) android client

# Features

Expand All @@ -14,4 +13,87 @@ It provides:
5. Child Immunization


[![Build Status](https://travis-ci.org/OpenSRP/opensrp-client-chw-core.svg?branch=master)](https://travis-ci.org/OpenSRP/opensrp-client-chw-core) [![Coverage Status](https://coveralls.io/repos/github/OpenSRP/opensrp-client-chw-core/badge.svg?branch=master)](https://coveralls.io/github/OpenSRP/opensrp-client-chw-core?branch=master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/f68511a1ac164d58a3a48c1926c2326a)](https://www.codacy.com/app/OpenSRP/opensrp-client-chw-core?utm_source=github.com&utm_medium=referral&utm_content=OpenSRP/opensrp-client-chw-core&utm_campaign=Badge_Grade)
### Download Dependency from GitHub Packages)

This library is currently available as a [Git Package](https://github.com/BlueCodeSystems/opensrp-client-ecap-chw-core/packages).

At the moment GitHub requires you to be authenticated in order to download Android Libraries hosted in GitHub packages. To do so you will need your **personal access token** and your GitHub **userid/username**.

Follow these steps to add the library as a dependency to your app.

**Step 1** : Generate a Personal Access Token for GitHub [How to generate GitHub personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)

**Step 2** : Store your GitHub — Personal Access Token details
Add these content to the **`local.properties`** file inside the root directory of your project.

```properties
gpr.usr=YOUR_GITHUB_USERID
gpr.key=YOUR_PERSONAL_ACCESS_TOKEN
```

**Step 3** : Update `build.gradle` for the application module

```groovy

def githubProperties = new Properties() //Read the github properties content
githubProperties.load(new FileInputStream(rootProject.file("local.properties")))

android {
//...
// include inside the android closure
repositories {
maven {
name = "GitHubPackages"
/**
* Configure path of the package repository on Github using the GITHUB_USER_ID and * Git Repository */
url = uri("https://maven.pkg.github.com/BlueCodeSystems/opensrp-client-ecap-chw-core")
credentials {
/** get credentials from local.properties in root project folder file with
** gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN otherwise ** Set env variable GPR_USER & GPR_API_KEY**/
username = githubProperties['gpr.usr'] ?: System.getenv("GPR_USER")
password = githubProperties['gpr.key'] ?: System.getenv("GPR_API_KEY")
}
}
}
//...
}
```

Add the library in the dependency section of your application's `build.gradle` file (obtain the latest version from [GitHub Packages](https://github.com/BlueCodeSystems/opensrp-client-ecap-chw-core/packages))

```groovy
dependencies {
//consume library - use the latest version available on github packages
implementation "org.smartregister:opensrp-ecap-chw-core:1.0.2-RELEASE"
//....
}
```

### Publish

#### 1. Locally
Run the following command to build the release `.aar` file and publish the library locally:

```shell
./gradlew opensrp-ecap-chw-core:assembleRelease && ./gradlew opensrp-ecap-chw-core:publishChwCorePublicationToMavenLocal
```

or (will publish all publications)

```shell
./gradlew opensrp-ecap-chw-core:assembleRelease && ./gradlew opensrp-ecap-chw-core:publishToMavenLocal
```

#### 1. Remotely

Run the following command to build the release `.aar` and publish the library to GitHub Package Registry:

```shell
./gradlew opensrp-ecap-chw-core:assembleRelease && ./gradlew opensrp-ecap-chw-core:publishChwCorePublicationToGitHubPackagesRepository
```

or (will publish all publications)

```shell
./gradlew opensrp-ecap-chw-core:assembleRelease && ./gradlew opensrp-ecap-chw-core:publish
```
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ buildscript {
maven { url 'https://jitpack.io' }
maven { url "https://repo.maven.apache.org/maven2" }
maven { url "http://cloudant.github.io/cloudant-sync-eap/repository" }
maven{ url "https://plugins.gradle.org/m2/" }
maven { url "https://plugins.gradle.org/m2/" }
mavenLocal()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.10.2'
Expand Down Expand Up @@ -51,14 +52,13 @@ allprojects {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
maven{ url "https://plugins.gradle.org/m2/" }
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
}
}

configure(allprojects) { project ->

version = VERSION_NAME
group = GROUP
buildscript {
repositories {
google()
Expand All @@ -76,11 +76,11 @@ subprojects {

group = 'org.smartregister'

ext.androidToolsBuildGradle = '4.0.0'
ext.androidBuildToolsVersion = '29.0.3'
ext.androidMinSdkVersion = 18
ext.androidCompileSdkVersion = 28
ext.androidTargetSdkVersion = 28
ext.androidToolsBuildGradle = '4.0.0'
ext.androidBuildToolsVersion = '29.0.3'
ext.androidMinSdkVersion = 18
ext.androidCompileSdkVersion = 28
ext.androidTargetSdkVersion = 28

ext.androidAnnotationsVersion = '3.0.1'
ext.androidAnnotationsAPIVersion = '3.0.1'
Expand Down
13 changes: 0 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
VERSION_NAME=2.0.32-SNAPSHOT
VERSION_CODE=1
GROUP=org.smartregister
POM_SETTING_DESCRIPTION=OpenSRP Client Chw Core Library
POM_SETTING_URL=https://github.com/OpenSRP/opensrp-client-chw-core
POM_SETTING_SCM_URL=https://github.com/OpenSRP/opensrp-client-chw-core
POM_SETTING_SCM_CONNECTION=scm:[email protected]:OpenSRP/opensrp-client-chw-core.git
POM_SETTING_SCM_DEV_CONNECTION=scm:[email protected]:OpenSRP/opensrp-client-chw-core.git
POM_SETTING_LICENCE_NAME=The Apache Software License, Version 2.0
POM_SETTING_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_SETTING_LICENCE_DIST=repo
POM_SETTING_DEVELOPER_ID=opensrp
POM_SETTING_DEVELOPER_NAME=OpenSRP Onadev
android.useAndroidX=true
android.enableJetifier=true
android.jetifier.blacklist=shadows
139 changes: 0 additions & 139 deletions maven.gradle

This file was deleted.

File renamed without changes.
Loading