Skip to content

Commit

Permalink
Adds initial version of kotlin and java pple sample apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Jurkowski committed Aug 5, 2022
1 parent 06455e7 commit 102ed41
Show file tree
Hide file tree
Showing 99 changed files with 3,111 additions and 201 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.gradle/
.DS_Store
.java-version
.idea

libs/
build/

local.properties
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

18 changes: 18 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
classpath("com.android.tools.build:gradle:7.2.2")
}
}

allprojects {
repositories {
google()
mavenCentral()
}
}
6 changes: 6 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8

# Migrate third-party libraries automatically to AndroidX
android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Mon Jan 24 17:22:45 CET 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
66 changes: 66 additions & 0 deletions javaapp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
plugins {
id("com.android.application")
}

android {
compileSdk = 32

namespace = "com.scandit.shelf.javaapp"
defaultConfig {
applicationId = "com.scandit.shelf.javaapp"
minSdk = 21
targetSdk = 32
versionCode = 1
versionName = "1.0"
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

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

dependencies {
implementation(files("libs/pple-sdk.aar"))
implementation(files("libs/pple-data.aar"))

implementation(files("libs/pple-contracts.jar"))
implementation(files("libs/pple-domain.jar"))
implementation(files("libs/pple-entities.jar"))

implementation(files("libs/ScanditCaptureCore.aar"))
implementation(files("libs/ScanditBarcodeCapture.aar"))
implementation(files("libs/ScanditLabelCapture.aar"))
implementation(files("libs/ScanditTextCaptureBase.aar"))
implementation(files("libs/ScanditPriceLabel.aar"))

implementation("androidx.core:core-ktx:1.8.0")
implementation("androidx.startup:startup-runtime:1.1.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("com.google.code.gson:gson:2.9.0")
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.squareup.okhttp3:okhttp:4.9.3")
implementation("com.squareup.okhttp3:logging-interceptor:4.9.3")
implementation("androidx.appcompat:appcompat:1.4.2")
implementation("com.google.android.material:material:1.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.4")
implementation("androidx.work:work-runtime-ktx:2.7.1")
implementation("androidx.room:room-runtime:2.4.3")
implementation("androidx.room:room-ktx:2.4.3")
implementation("androidx.constraintlayout:constraintlayout:2.1.3")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.5.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.0")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01")
}
21 changes: 21 additions & 0 deletions javaapp/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
23 changes: 23 additions & 0 deletions javaapp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.scandit.shelf.javaapp">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.DebugApp">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

</manifest>
22 changes: 22 additions & 0 deletions javaapp/src/main/java/com/scandit/shelf/javaapp/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.scandit.shelf.javaapp;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.scandit.shelf.javaapp.ui.login.LoginFragment;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
if (savedInstanceState == null) {
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.fragment_container, LoginFragment.newInstance())
.commitNow();
}
}
}
Loading

0 comments on commit 102ed41

Please sign in to comment.