Skip to content
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

chore: Update project #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
51 changes: 0 additions & 51 deletions android-pdf-viewer/build.gradle

This file was deleted.

58 changes: 58 additions & 0 deletions android-pdf-viewer/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
plugins {
id("com.android.library")
id("maven-publish")
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.kapt)
}

val libMinSdk: Int by rootProject.extra
val libCompileSdk: Int by rootProject.extra
val libTargetSdk: Int by rootProject.extra
val javaVersion: JavaVersion by rootProject.extra
val libVersionName: String by rootProject.extra

android {
namespace = "com.infomaniak.lib.pdfview"

defaultConfig {
minSdk = libMinSdk
compileSdk = libCompileSdk
targetSdk = libTargetSdk
}

publishing {
singleVariant("release") {
withSourcesJar()
}
}

compileOptions {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}

kotlinOptions {
jvmTarget = javaVersion.toString()
}
}

dependencies {
implementation(libs.core.ktx)
implementation(libs.recyclerview)
implementation(libs.viewpager2)

api(libs.pdfium)
}

afterEvaluate {
publishing {
publications {
create<MavenPublication>("release") {
from(components.findByName("release")!!)
groupId = "com.github.Infomaniak"
artifactId = "android-pdfview"
version = libVersionName
}
}
}
}
33 changes: 0 additions & 33 deletions build.gradle

This file was deleted.

31 changes: 31 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
buildscript {

extra.apply {
set("libMinSdk", 21)
set("libCompileSdk", 34)
set("libTargetSdk", 34)
set("libVersionName", "3.2.11")
set("javaVersion", JavaVersion.VERSION_17)
set("kotlinVersion", "2.0.21")
}

repositories {
google()
mavenCentral()
}

dependencies {
classpath(libs.gradle)
}
}

apply(plugin = "maven-publish")

allprojects {
repositories {
google()
//mavenLocal()
mavenCentral()
maven("https://jitpack.io")
}
}
26 changes: 26 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[versions]
activityKtx = "1.9.3"
androidannotations = "4.8.0"
appcompat = "1.7.0"
coreKtx = "1.13.1"
gradle = "8.9.0"
kotlinAndroid = "2.0.21"
material = "1.12.0"
pdfium = "1.9.6"
recyclerView = "1.3.2"
viewpager2 = "1.1.0"

[libraries]
activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activityKtx" }
androidannotations = { module = "org.androidannotations:androidannotations", version.ref = "androidannotations" }
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
material = { module = "com.google.android.material:material", version.ref = "material" }
pdfium = { module = "com.github.infomaniak:pdfiumandroid", version.ref = "pdfium" }
recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerView" }
viewpager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "viewpager2" }

[plugins]
kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlinAndroid" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinAndroid" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
53 changes: 0 additions & 53 deletions sample/build.gradle

This file was deleted.

56 changes: 56 additions & 0 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
buildscript {
repositories {
google()
mavenCentral()
}
}

repositories {
google()
//mavenLocal()
mavenCentral()
}

plugins {
id("com.android.application")

alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.kapt)
}

val libMinSdk: Int by rootProject.extra
val libCompileSdk: Int by rootProject.extra
val libTargetSdk: Int by rootProject.extra
val javaVersion: JavaVersion by rootProject.extra
val versionName: String by rootProject.extra

android {
namespace = "com.infomaniak.lib.pdfview.sample"

defaultConfig {
minSdk = libMinSdk
compileSdk = libCompileSdk
targetSdk = libTargetSdk
versionCode = 3
versionName = versionName
}
buildFeatures { viewBinding = true }

compileOptions {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}

kotlinOptions { jvmTarget = javaVersion.toString() }
}

dependencies {
implementation(project(":android-pdf-viewer"))

implementation(libs.activity.ktx)
implementation(libs.appcompat)
implementation(libs.material)
implementation(libs.pdfium)

annotationProcessor(libs.androidannotations)
}
2 changes: 0 additions & 2 deletions settings.gradle

This file was deleted.

2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include(":android-pdf-viewer")
include(":sample")