Skip to content

Commit

Permalink
Migrated configuration scripts from Groovy to Kotlin DSL completely
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshPanchal18 committed Oct 31, 2023
1 parent e1d012c commit f78b040
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 90 deletions.
5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 0 additions & 57 deletions app/build.gradle

This file was deleted.

64 changes: 64 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
plugins {
id("com.android.application")
id("kotlin-android")
id("org.jetbrains.kotlin.android")
}

android {
compileSdk = 33

defaultConfig {
applicationId = "com.saverio.pdfviewer"
minSdk = 21
targetSdk = 33
versionCode = 60
versionName = "1.15"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {

val kotlin_version = "1.4.21"

implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
implementation("androidx.core:core-ktx:1.6.0")
implementation("androidx.appcompat:appcompat:1.3.1")
implementation("com.google.android.material:material:1.4.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.0")
implementation("androidx.vectordrawable:vectordrawable:1.1.0")

val navigation_version = "2.3.5"
implementation("androidx.navigation:navigation-fragment:$navigation_version")
implementation("androidx.navigation:navigation-ui:$navigation_version")
implementation("androidx.navigation:navigation-fragment-ktx:$navigation_version")
implementation("androidx.navigation:navigation-ui-ktx:$navigation_version")

val lifecycle_version = "2.3.1"
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version")

//implementation "androidx.core:core-ktx:+"
testImplementation("junit:junit:4.+")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")

implementation("com.github.barteksc:pdfium-android:1.9.0")
implementation("com.github.barteksc:android-pdf-viewer:3.1.0-beta.1")
//Use "2.8.2" is stable | "3.1.0-beta.1" is unstable
}
4 changes: 2 additions & 2 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand All @@ -18,4 +18,4 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile
28 changes: 0 additions & 28 deletions build.gradle

This file was deleted.

27 changes: 27 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath ("com.android.tools.build:gradle:7.4.1")
classpath ("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

tasks.register("clean",Delete::class.java) {
delete(rootProject.buildDir)
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Aug 01 11:35:59 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
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(":app")
rootProject.name = "Sav PDF Viewer"

0 comments on commit f78b040

Please sign in to comment.