Skip to content

Update Readme and jitpack configs #15

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

Merged
merged 5 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add configs for jitpack publishing
  • Loading branch information
prayansh committed Jun 30, 2021
commit c98a8a8f1d2a20296cf83861bca889e30138bea8
4 changes: 3 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,6 @@ dependencies {
// Add Roboelectric dependencies.
testImplementation 'org.robolectric:robolectric:4.5'
testImplementation 'androidx.test:core:1.3.0'
}
}

apply from: rootProject.file('gradle/jitpack-android.gradle')
4 changes: 3 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ dependencies {

testImplementation platform("org.junit:junit-bom:5.7.2")
testImplementation "org.junit.jupiter:junit-jupiter"
}
}

apply from: rootProject.file('gradle/jitpack-core.gradle')
26 changes: 26 additions & 0 deletions gradle/jitpack-android.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Needed for Jitpack (ref: https://github.com/jitpack/gradle-modular/blob/6816f11/build.gradle)
apply plugin: 'maven'

task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}

task javadoc(type: Javadoc) {
failOnError false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
}

// build a jar with javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

// Attach Javadocs and Sources jar
artifacts {
archives sourcesJar
archives javadocJar
}
18 changes: 18 additions & 0 deletions gradle/jitpack-core.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Needed for Jitpack (ref: https://github.com/jitpack/gradle-modular/blob/6816f11/build.gradle)
apply plugin: 'maven'

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

// Attach Javadocs and Sources jar
artifacts {
archives sourcesJar
archives javadocJar
}