Skip to content

Commit

Permalink
Revert demo refactor (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
lomartins authored Oct 24, 2024
1 parent 3e26db8 commit d0deca8
Show file tree
Hide file tree
Showing 57 changed files with 1,763 additions and 3,279 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@
/captures
*.iml
gertec/gertec-keystore.properties
positivo/positivo-keystore.properties
gertec/*.jks
positivo/*.jks
.kotlin
83 changes: 15 additions & 68 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
alias(libs.plugins.compose.compiler)
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: '../gertec/gertec-signing-config.gradle'
apply from: '../positivo/positivo-signing-config.gradle'

android {

flavorDimensions = ["manufacturer"]
productFlavors {
standard {
dimension "manufacturer"
signingConfig signingConfigs.debug
isDefault true
}
}
compileSdk 34
compileSdkVersion 34
buildToolsVersion '28.0.3'

defaultConfig {
applicationId "br.com.stonesdk.sdkdemo"
Expand All @@ -26,72 +15,31 @@ android {
versionName "1.0"
}

buildFeatures {
compose true
}

testOptions {
unitTests.returnDefaultValues = true
}

buildTypes {

//Necessary for the functioning of Positivo's signature in debug mode.
debug {
signingConfig null
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

packagingOptions {
exclude 'META-INF/api_release.kotlin_module'
exclude 'META-INF/client_release.kotlin_module'
}


buildFeatures {
viewBinding true
}
namespace 'br.com.stonesdk.sdkdemo'
}

dependencies {

def composeBom = platform('androidx.compose:compose-bom:2024.06.00')
implementation composeBom
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.foundation:foundation'
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.activity:activity-compose:1.9.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.8.3'

implementation("io.insert-koin:koin-core:3.1.6")
implementation("io.insert-koin:koin-android:3.1.6")
implementation("io.insert-koin:koin-androidx-compose:3.1.6")

debugImplementation 'androidx.compose.ui:ui-tooling'
androidTestImplementation composeBom

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.github.permissions-dispatcher:permissionsdispatcher:4.8.0'
annotationProcessor "com.github.permissions-dispatcher:permissionsdispatcher-processor:4.8.0"
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.material:material:1.12.0'
implementation 'com.google.accompanist:accompanist-permissions:0.35.0-alpha'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.3.0'

debugImplementation "com.github.tony19:logback-android:2.0.0"
debugImplementation "br.com.stone.sdk.android:debugmode:4.0.3"
Expand All @@ -102,12 +50,11 @@ dependencies {
implementation "br.com.stone:stone-sdk-posandroid-positivo:$stone_sdk_version"
implementation "br.com.stone:stone-sdk-posandroid-gertec:$stone_sdk_version"
implementation "br.com.stone:stone-sdk-posandroid-sunmi:$stone_sdk_version"
implementation "androidx.activity:activity-ktx:1.9.1"
implementation "androidx.fragment:fragment-ktx:1.8.2"

testImplementation "io.mockk:mockk:1.13.12"
testImplementation "org.junit.platform:junit-platform-launcher:1.10.0"
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.10.0"
testImplementation "org.junit.vintage:junit-vintage-engine:5.10.0"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0-RC"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

testImplementation "io.mockk:mockk:1.10.6"
testImplementation "org.junit.platform:junit-platform-launcher:1.7.1"
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.7.1"
testImplementation "org.junit.vintage:junit-vintage-engine:5.7.1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package br.com.stonesdk.sdkdemo;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
13 changes: 5 additions & 8 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
xmlns:tools="http://schemas.android.com/tools"
package="br.com.stonesdk.sdkdemo">
<!-- Permissoes necessarias para o pleno funcionamento do aplicativo e da SDK -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.INTERNET" />

Expand All @@ -16,7 +15,6 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:name=".activities.DemoApplication"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".activities.MifareActivity"
Expand All @@ -25,7 +23,7 @@
android:name=".activities.MainActivity"
android:label="@string/app_name" />
<activity
android:name=".activities.devices.DevicesActivity"
android:name=".activities.DevicesActivity"
android:label="@string/title_activity_devices" />
<activity
android:name=".activities.TransactionActivity"
Expand All @@ -38,9 +36,8 @@
android:label="@string/title_activity_disconnect_pinpad"
android:theme="@style/AppThemeWithoutBar" />
<activity
android:name=".activities.validation.ValidationActivity"
android:name=".activities.ValidationActivity"
android:label="@string/title_activity_validation"
android:exported="true"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -52,7 +49,7 @@
android:name=".activities.PosTransactionActivity"
android:label="@string/title_activity_transaction" />
<activity
android:name=".activities.manageStoneCode.ManageStoneCodeActivity"
android:name=".activities.ManageStoneCodeActivity"
android:label="@string/title_activity_manage_stone_codes" />
</application>

Expand Down
44 changes: 0 additions & 44 deletions app/src/main/java/br/com/stonesdk/sdkdemo/DI.kt

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/java/br/com/stonesdk/sdkdemo/FeatureFlag.kt

This file was deleted.

Loading

0 comments on commit d0deca8

Please sign in to comment.