Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.nikita36078:donations:2.9'
}
dependencies {
implementation("com.github.nikita36078:donations:2.9")
}
<dependency>
<groupId>com.github.nikita36078</groupId>
<artifactId>donations</artifactId>
<version>2.9</version>
</dependency>
libraryDependencies += "com.github.nikita36078" % "donations" % "2.9"
:dependencies [[com.github.nikita36078/donations "2.9"]]
Android Donations Lib supports donations by Google Play Store, Flattr, PayPal, and Bitcoin.
It is used in projects, such as OpenKeychain, AdAway, FasterGPS, and NTPSync.
NOTE: Google mailed me to remove PayPal donation capability when publishing on Google Play! Thus, you should build "product flavors" defined by the example: One version with Google Play donation capability and one with Paypal, Flattr, and Bitcoin!
Add dependency to your build.gradle:
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.nikita36078:donations:2.9'
}
private static final String[] GOOGLE_CATALOG
DONATIONS_GOOGLE
to the auto generated BuildConfig.java.<uses-permission android:name="android.permission.INTERNET" />
to product flavors that use Flattr| Product Flavor: Google | Product Flavor: Fdroid |
|------------------------|------------------------|
| |
|
./gradlew build
Fork Android Donations Lib and do a pull request. I will merge your changes back into the main project.