GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jitpack/android-example: Example Android library that builds on jitpack.io

BranchesTags
Open more actions menu

Latest commit

 

History

76 Commits
76 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
gradle/wrapper
gradle/wrapper
 
 
library
library
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
jitpack.yml
jitpack.yml
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

android-example

Release

Example Android library project that works with jitpack.io.

See this Tutorial on how to publish an Android Library with JitPack.

For more details check out the documentation

https://jitpack.io/#jitpack/android-example

Add it to your settings.gradle with:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

and:

dependencies {
    implementation 'com.github.jitpack:android-example:{latest version}'
}

Multiple build variants

If your library uses multiple flavours then see this example: https://github.com/jitpack-io/android-jitpack-library-example

Adding the maven plugin

To enable installing into local maven repository and JitPack you need to add the maven-publish plugin:

Then add the publishing section to your library build.gradle:

publishing {
  publications {
    release(MavenPublication) {
      groupId = 'com.my-company'
      artifactId = 'my-library'
      version = '1.0'

      afterEvaluate {
        from components.release
      }
    }
  }
}

After these changes you should be able to run:

./gradlew publishToMavenLocal

from the root of your project. If publishToMavenLocal works and you have added a GitHub release it should work on jitpack.io

Adding a sample app

If you add a sample app to the same repo then your app needs to have a dependency on the library. To do this in your app/build.gradle add:

    dependencies {
        compile project(':library')
    }

About

Example Android library that builds on jitpack.io

Topics

androidandroid-librarygradlejitpackkotlin

Resources

Readme
Activity
Custom properties

Stars

226 stars

Watchers

6 watching

Forks

200 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.