Skip to content

Commit fcca692

Browse files
Renju MenonRenju Menon
authored andcommitted
add jitpack.yml to correctly bulid aar from android-pdf-viewer and pdfium
1 parent ee4b3cb commit fcca692

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

android-pdf-viewer/build.gradle

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'com.kezong.fat-aar'
3+
apply plugin: 'maven-publish'
34

45
android {
56
compileSdkVersion 35
@@ -59,4 +60,27 @@ afterEvaluate {
5960
dependsOn(releaseEmbedTask)
6061
}
6162
}
63+
}
64+
65+
afterEvaluate {
66+
publishing {
67+
publications {
68+
aar(MavenPublication) {
69+
groupId = 'com.github.T-Pro'
70+
artifactId = 'AndroidPdfViewer'
71+
version = '4.10.0'
72+
73+
// path to the assembled AAR produced by assembleRelease
74+
def aarFile = file("$buildDir/outputs/aar/${project.getName()}-release.aar")
75+
if (!aarFile.exists()) {
76+
throw new GradleException("AAR not found: ${aarFile}. Run :${project.path}:assembleRelease first.")
77+
}
78+
artifact(aarFile)
79+
}
80+
}
81+
82+
repositories {
83+
mavenLocal()
84+
}
85+
}
6286
}

jitpack.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
install:
2+
- ./gradlew --no-daemon -v
3+
4+
script:
5+
- ./gradlew :pdfium:assembleRelease :android-pdf-viewer:assembleRelease -x lint -x test
6+
- ./gradlew :android-pdf-viewer:publishAarPublicationToMavenLocal -x lint -x test

0 commit comments

Comments
 (0)