Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaztahir committed May 6, 2022
1 parent 2e43f0a commit a2d3433
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 84 deletions.
18 changes: 9 additions & 9 deletions .idea/modules.xml

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ the metadata information about the site , Use it however you like

```kotlin
// getLinkPreview throws an exception when encounters an error
val preview = runCatching { getLinkPreview(url) }.getOrNull()
val preview = try { getLinkPreview(url) }catch(ex : Exception){ null }
```
17 changes: 7 additions & 10 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
plugins {
id("org.jetbrains.compose") version BuildConfig.Info.ComposeVersion
id("org.jetbrains.compose")
id("com.android.application")
kotlin("android")
}

group = BuildConfig.Info.group
version = BuildConfig.Info.version

dependencies {
implementation("androidx.activity:activity-compose:1.4.0")
implementation(project(":linkpreview"))
Expand All @@ -15,17 +12,17 @@ dependencies {
implementation(material)
implementation(foundation)
}
implementation("io.coil-kt:coil-compose:2.0.0-rc02")
implementation("io.coil-kt:coil-compose:2.0.0-rc03")
}

android {
compileSdk = BuildConfig.Android.compileSdkVersion
compileSdk = 31
defaultConfig {
applicationId = "com.wakaztahir.android"
minSdk = BuildConfig.Android.minSdkVersion
targetSdk = BuildConfig.Android.targetSdkVersion
versionCode = BuildConfig.Info.versionCode
versionName = BuildConfig.Info.version
minSdk = 21
targetSdk = 31
versionCode = 1
versionName = "1.0"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
11 changes: 5 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${BuildConfig.Info.KotlinVersion}")
classpath("com.android.tools.build:gradle:7.0.4")
classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4")
classpath("com.github.dcendents:android-maven-gradle-plugin:1.4.1")
}
}

group = BuildConfig.Info.group
version = BuildConfig.Info.version

plugins {
id("org.jetbrains.dokka") version BuildConfig.Info.DokkaVersion
kotlin("multiplatform").apply(false)
id("org.jetbrains.compose").apply(false)
id("com.android.application").apply(false)
id("com.android.library").apply(false)
id("org.jetbrains.dokka")
}

tasks.withType<org.jetbrains.dokka.gradle.DokkaMultiModuleTask>(){
Expand Down
9 changes: 0 additions & 9 deletions buildSrc/build.gradle.kts

This file was deleted.

25 changes: 0 additions & 25 deletions buildSrc/src/main/java/BuildConfig.kt

This file was deleted.

5 changes: 1 addition & 4 deletions desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
kotlin("multiplatform")
id("org.jetbrains.compose") version BuildConfig.Info.ComposeVersion
id("org.jetbrains.compose")
}

group = BuildConfig.Info.group
version = BuildConfig.Info.version

kotlin {
jvm {
compilations.all {
Expand Down
19 changes: 4 additions & 15 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
version=1.0.3
kotlin.version=1.6.21
compose.version=1.2.0-alpha01-dev679
agp.version=7.0.4
10 changes: 5 additions & 5 deletions linkpreview/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ plugins {
id("org.jetbrains.dokka")
}

group = BuildConfig.Info.group
version = BuildConfig.Info.version
group = "com.wakaztahir"
version = property("version") as String

android {
compileSdk = BuildConfig.Android.compileSdkVersion
compileSdk = 31
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = BuildConfig.Android.minSdkVersion
targetSdk = BuildConfig.Android.targetSdkVersion
minSdk = 21
targetSdk = 31
consumerProguardFiles("proguard-rules.pro")
}
compileOptions {
Expand Down
7 changes: 7 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ pluginManagement {
mavenCentral()
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
}
plugins {
kotlin("multiplatform").version(extra["kotlin.version"] as String)
id("org.jetbrains.compose").version(extra["compose.version"] as String)
id("com.android.application").version(extra["agp.version"] as String)
id("com.android.library").version(extra["agp.version"] as String)
id("org.jetbrains.dokka").version(extra["kotlin.version"] as String)
}
}

rootProject.name = "KMPLinkPreview"
Expand Down

0 comments on commit a2d3433

Please # to comment.