Skip to content

Latest commit

 

History

History
114 lines (79 loc) · 3.34 KB

CONTRIBUTING.md

File metadata and controls

114 lines (79 loc) · 3.34 KB

How to contribute

Bug reports and pull requests from users are what keep this project working.

Basics

  1. Create an issue and describe your idea
  2. Fork it
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Publish the branch (git push origin my-new-feature)
  6. Create a new Pull Request

Running for development

Step 1: Publish the plugin to mavenLocal

  1. In the project's build.gradle file comment the stage reference and add maven local:
repositories {
    mavenCentral()
    google()
    gradlePluginPortal()
    mavenLocal()
}
  1. Edit the android-base-lib.gradle file in buildSrc and remove id("signing"") inside the plugins:
plugins {
    id("com.android.library")
    id("io.gitlab.arturbosch.detekt")
    kotlin("android")
    id("jacoco")
    id("maven-publish")
}
  1. Below the plugins` add the next code:
publishing {
    publications {
        register<MavenPublication>("release") {
            group = getPropertyOrFail("group")
            artifactId = properties.get("artifactId").toString()
            version = getPropertyOrFail("version")

            afterEvaluate {
                from(components["release"])
            }
        }
    }
}
  1. Below the comment // Publishing block remove all the code.

  2. Go to Android Studio -> Gradle tab and run the publishToMavenLocalin the maps-api, maps-api-googlemaps and maps-api-openstreetmap:

gradle-maps-api gradle-maps-api-gms gradle-maps-api-ngms

Step 2: Verify plugin is published

Go to /Users/your_user/.m2 dot folder and you'll find the plugin.

Step 3: Debug

Add some prints to debug the code

Step 4: Test it

Create a sample project, add the plugin and sync the project with gradle and you'll see logs in the Build tab in Android Studio.

Checking your work

You can verify your code with the following tasks:

./gradlew assemble
./gradlew detekt

Once you have made a change in any of the maps-api, maps-api-google maps or maps-api-openstreetmap modules, you must publishToMavenLocal in that module in order to see the changes.

Write documentation

This project has documentation in a few places:

Introduction and usage

A friendly README.md written for many audiences.

Examples and advanced usage

You can find more information in the wiki.

Releasing a new version

  1. Clone the repository
  2. Update the changelog (and commit it afterwards)
  3. Push the changes and wait for the latest CI build to complete
  4. Bump the version, create a Git tag and commit the changes
  5. Push the version bump commit: git push
  6. Push the Git tag: git push --tags

Governance

For details on our project's governance model and how decisions are made, please see our Governance Policy.