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

Technical: Leverage Kotlin Build Scripts. #1046

Merged
merged 1 commit into from
Dec 10, 2023
Merged
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
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The library has 4 different sprites providers to choose from ([iOS](#ios-emojis)
For getting the above iOS Emojis, add the dependency:

```groovy
implementation "com.vanniktech:emoji-ios:0.18.0-SNAPSHOT"
implementation("com.vanniktech:emoji-ios:0.18.0-SNAPSHOT")
```

And install the provider in your Application class.
Expand All @@ -45,7 +45,7 @@ EmojiManager.install(IosEmojiProvider())
For getting the above Google Emojis, add the dependency:

```groovy
implementation "com.vanniktech:emoji-google:0.18.0-SNAPSHOT"
implementation("com.vanniktech:emoji-google:0.18.0-SNAPSHOT")
```

And install the provider in your Application class.
Expand All @@ -64,7 +64,7 @@ EmojiManager.install(GoogleEmojiProvider())
For getting the above Facebook Emojis, add the dependency:

```groovy
implementation "com.vanniktech:emoji-facebook:0.18.0-SNAPSHOT"
implementation("com.vanniktech:emoji-facebook:0.18.0-SNAPSHOT")
```

And install the provider in your Application class.
Expand All @@ -83,7 +83,7 @@ EmojiManager.install(FacebookEmojiProvider())
For getting the above Twitter Emojis, add the dependency:

```groovy
implementation "com.vanniktech:emoji-twitter:0.18.0-SNAPSHOT"
implementation("com.vanniktech:emoji-twitter:0.18.0-SNAPSHOT")
```

And install the provider in your Application class.
Expand All @@ -102,7 +102,7 @@ EmojiManager.install(TwitterEmojiProvider())
For getting the above Google Emojis, add the dependency (only works for Android Apps):

```groovy
implementation "com.vanniktech:emoji-google-compat:0.18.0-SNAPSHOT"
implementation("com.vanniktech:emoji-google-compat:0.18.0-SNAPSHOT")
```

And install the provider in your Application class.
Expand Down Expand Up @@ -150,15 +150,15 @@ If you want to display your own Emojis you can create your own implementation of
All of the core API lays in `emoji`, which is being pulled in automatically by the providers:

```groovy
implementation "com.vanniktech:emoji:0.18.0-SNAPSHOT"
implementation("com.vanniktech:emoji:0.18.0-SNAPSHOT")
```

## Android Material

Material Design Library bindings can be included via:

```groovy
implementation "com.vanniktech:emoji-material:0.18.0-SNAPSHOT"
implementation("com.vanniktech:emoji-material:0.18.0-SNAPSHOT")
```

- [`EmojiMaterialButton`](./emoji-material/src/androidMain/kotlin/com/vanniktech/emoji/material/mojiMaterialButton.kt)
Expand Down Expand Up @@ -333,13 +333,13 @@ maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
```

```groovy
implementation "com.vanniktech:emoji:0.18.0-SNAPSHOT"
implementation "com.vanniktech:emoji-ios:0.18.0-SNAPSHOT"
implementation "com.vanniktech:emoji-google:0.18.0-SNAPSHOT"
implementation "com.vanniktech:emoji-google-compat:0.18.0-SNAPSHOT"
implementation "com.vanniktech:emoji-twitter:0.18.0-SNAPSHOT"
implementation "com.vanniktech:emoji-facebook:0.18.0-SNAPSHOT"
implementation "com.vanniktech:emoji-material:0.18.0-SNAPSHOT"
implementation("com.vanniktech:emoji:0.18.0-SNAPSHOT")
implementation("com.vanniktech:emoji-ios:0.18.0-SNAPSHOT")
implementation("com.vanniktech:emoji-google:0.18.0-SNAPSHOT")
implementation("com.vanniktech:emoji-google-compat:0.18.0-SNAPSHOT")
implementation("com.vanniktech:emoji-twitter:0.18.0-SNAPSHOT")
implementation("com.vanniktech:emoji-facebook:0.18.0-SNAPSHOT")
implementation("com.vanniktech:emoji-material:0.18.0-SNAPSHOT")
```

# Proguard / R8
Expand Down
87 changes: 0 additions & 87 deletions app/build.gradle

This file was deleted.

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

kotlin {
jvmToolchain(11)
}

android {
val shouldSign = project.hasProperty("RISK_BATTLE_SIMULATOR_RELEASE_STORE_FILE") &&
project.hasProperty("RISK_BATTLE_SIMULATOR_RELEASE_STORE_PASSWORD") &&
project.hasProperty("RISK_BATTLE_SIMULATOR_RELEASE_KEY_ALIAS") &&
project.hasProperty("RISK_BATTLE_SIMULATOR_RELEASE_KEY_PASSWORD")

namespace = "com.vanniktech.emoji.sample"

compileSdk = libs.versions.compileSdk.get().toInt()

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

defaultConfig {
applicationId = "com.vanniktech.emoji.sample"
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
versionCode = 1
versionName = project.property("VERSION_NAME").toString()

vectorDrawables.useSupportLibrary = true

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

buildFeatures {
viewBinding = true
}

signingConfigs {
if (shouldSign) {
create("release") {
storeFile = file(project.property("RISK_BATTLE_SIMULATOR_RELEASE_STORE_FILE").toString())
storePassword = project.property("RISK_BATTLE_SIMULATOR_RELEASE_STORE_PASSWORD").toString()
keyAlias = project.property("RISK_BATTLE_SIMULATOR_RELEASE_KEY_ALIAS").toString()
keyPassword = project.property("RISK_BATTLE_SIMULATOR_RELEASE_KEY_PASSWORD").toString()
}
}
}

buildTypes {
release {
signingConfigs.findByName("release")?.let { signingConfig = it }
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
}
}

dependencies {
implementation(project(":emoji-ios"))
implementation(project(":emoji-google"))
implementation(project(":emoji-google-compat"))
implementation(project(":emoji-twitter"))
implementation(project(":emoji-facebook"))
implementation(project(":emoji-material"))
implementation(libs.timber)
}

dependencies {
debugImplementation(libs.leakcanary.android)
}

dependencies {
androidTestImplementation(libs.androidx.test.espresso)
androidTestImplementation(libs.androidx.test.ext)
androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.falcon)
androidTestImplementation(libs.junitintegrationrules)
androidTestImplementation(libs.screengrab)
androidTestImplementation(libs.espressocoreutils)
}
2 changes: 0 additions & 2 deletions app/proguard-rules.txt

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ subprojects {

project.tasks.withType(Test) {
testLogging {
testLogging.exceptionFormat = 'full'
testLogging.exceptionFormat = "full"
}
}
}
79 changes: 0 additions & 79 deletions emoji-facebook/build.gradle

This file was deleted.

Loading