Skip to content

Commit

Permalink
Merge pull request #46 from fingerprintjs/feature/project-refinements
Browse files Browse the repository at this point in the history
Feature/project refinements
  • Loading branch information
Sergey-Makarov authored Oct 16, 2023
2 parents b3312da + fba49a8 commit 616ba73
Show file tree
Hide file tree
Showing 11 changed files with 137 additions and 115 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
*.iml
.gradle
/local.properties
/.idea/*
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
3 changes: 3 additions & 0 deletions .idea/.gitignore

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

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
83 changes: 0 additions & 83 deletions app/build.gradle

This file was deleted.

93 changes: 93 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import com.android.build.gradle.internal.api.BaseVariantOutputImpl

@Suppress("PropertyName")
val VERSION_NAME="2.3.3"
@Suppress("PropertyName")
val VERSION_CODE=16

plugins {
id("com.android.application")
id("kotlin-android")
id("org.jetbrains.kotlin.plugin.parcelize")
}

android {
compileSdk = 34

defaultConfig {
applicationId = "com.fingerprintjs.android.fpjs_pro_demo"
minSdk = 21
targetSdk = 33
versionCode = VERSION_CODE
versionName = VERSION_NAME

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

signingConfigs {
create("release") {
storeFile = file("release.jks")
storePassword = System.getenv("KEYSTORE_PASSWORD")
keyAlias = System.getenv("RELEASE_SIGN_KEY_ALIAS")
keyPassword = System.getenv("RELEASE_SIGN_KEY_PASSWORD")
}
create("releaseLocalSign") {
storeFile = file("release_local.jks")
storePassword = "password"
keyAlias = "key0"
keyPassword = "password"
}
}

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
signingConfig = signingConfigs.getByName("release")
}
create("releaseLocalSign") {
isMinifyEnabled = true
proguardFiles (getDefaultProguardFile ("proguard-android-optimize.txt"), "proguard-rules.pro")
signingConfig = signingConfigs.getByName("releaseLocalSign")
matchingFallbacks += listOf("release")
}
}

namespace = "com.fingerprintjs.android.fpjs_pro_demo"

buildFeatures {
buildConfig = true
}

compileOptions {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}

applicationVariants.all {
val variant = this
this.outputs.all {
(this as? BaseVariantOutputImpl)?.outputFileName = "FPJS-Pro-Playground-${variant.name}-${variant.versionName}.apk"
}
}
}

dependencies {
val useFpProDebugVersion = false // switch to true when needed to debug the library
implementation("com.fingerprint.android:pro:$VERSION_NAME${if (useFpProDebugVersion) "-debug" else ""}")

implementation("org.osmdroid:osmdroid-android:6.1.11")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")

// see https://github.com/google/tink/issues/702
implementation("androidx.security:security-crypto-ktx:1.1.0-alpha06") {
exclude(group = "com.google.crypto.tink", module = "tink-android")
}
implementation("com.google.crypto.tink:tink-android:1.9.0")
}
16 changes: 0 additions & 16 deletions build.gradle

This file was deleted.

14 changes: 14 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.1.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
}
}

task<Delete>("clean") {
delete(rootProject.buildDir)
}
3 changes: 0 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ android.enableJetifier=true
kotlin.code.style=official
android.useAndroidX=true
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
VERSION_NAME=2.3.3
VERSION_CODE=16
android.defaults.buildfeatures.buildconfig=true
2 changes: 0 additions & 2 deletions jitpack.yml

This file was deleted.

11 changes: 0 additions & 11 deletions settings.gradle

This file was deleted.

17 changes: 17 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
mavenLocal {
mavenContent {
includeVersionByRegex("com.fingerprint.android", "pro", ".*-debug")
}
}

maven { url = uri("https://jitpack.io") }
maven { url = uri("https://maven.fpregistry.io/releases") }
}
}
rootProject.name = "fingerprintjs-pro-android-demo"
include(":app")

0 comments on commit 616ba73

Please sign in to comment.