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

Update to new agp + new kotlin version #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
60 changes: 60 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "Pr workflow"

on:
pull_request:
types: [ opened, synchronize, edited, reopened ]
branches:
- master

concurrency:
group: zebra-pr-${{ github.head_ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
env:
GRADLE_OPTS: -Dorg.gradle.workers.max=4 -Dorg.gradle.parallel=true -Dkotlin.compiler.execution.strategy=in-process"

steps:
- name: "Check out code"
uses: actions/checkout@v4

- name: "Setup java"
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- uses: gradle/wrapper-validation-action@v1

- uses: gradle/gradle-build-action@v2

- name: "Build BasicIntent1"
run: ./gradlew :BasicIntent1:app:assembleDebug :BasicIntent1:app:lintDebug

- name: "Build DataCapture1"
run: ./gradlew :DataCapture1:app:assembleDebug :DataCapture1:app:lintDebug

- name: "Build DocumentCaptureSample1"
run: ./gradlew :DocumentCaptureSample1:app:assembleDebug :DocumentCaptureSample1:app:lintDebug

- name: "Build FreeFormOCRSample1"
run: ./gradlew :FreeFormOCRSample1:app:assembleDebug :FreeFormOCRSample1:app:lintDebug

- name: "Build SignatureCapture1"
run: ./gradlew :SignatureCapture1:app:assembleDebug :SignatureCapture1:app:lintDebug

- name: "Build SignatureCapture2"
run: ./gradlew :SignatureCapture2:app:assembleDebug :SignatureCapture2:app:lintDebug

- name: "Build TruckLoadingDemo"
run: ./gradlew :TruckLoadingDemo:app:assembleDebug :TruckLoadingDemo:app:lintDebug

- name: "Upload reports"
uses: actions/upload-artifact@v3
if: failure()
with:
name: Reports
path: '**/build/reports/*'
retention-days: 2
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
22 changes: 13 additions & 9 deletions BasicIntent1/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
namespace = "com.zebra.basicintent1"
compileSdkVersion 34

defaultConfig {
applicationId "com.zebra.basicintent1"
minSdkVersion 16
targetSdkVersion 28
minSdkVersion 26
targetSdkVersion 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
Expand All @@ -18,11 +19,14 @@ android {
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
}
7 changes: 3 additions & 4 deletions BasicIntent1/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zebra.basicintent1">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand All @@ -9,10 +8,10 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;


public class MainActivity extends AppCompatActivity {

//
Expand Down
4 changes: 2 additions & 2 deletions BasicIntent1/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
Expand Down Expand Up @@ -68,4 +68,4 @@
app:layout_constraintStart_toEndOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/lblScanData" />

</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
6 changes: 3 additions & 3 deletions BasicIntent1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.2.0' apply false
id 'com.android.library' version '7.2.0' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
id 'com.android.application' version '8.1.2' apply false
id 'com.android.library' version '8.1.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.20' apply false
}

task clean(type: Delete) {
Expand Down
19 changes: 17 additions & 2 deletions BasicIntent1/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,23 @@
# 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.
org.gradle.jvmargs=-Xmx1536m
org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8
# 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

org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.parallel=true

# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true

org.gradle.configuration-cache=true
org.gradle.configuration-cache.max-problems=5
3 changes: 2 additions & 1 deletion BasicIntent1/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Wed Sep 14 16:29:45 EEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionPath=wrapper/dists
validateDistributionUrl=true
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
23 changes: 12 additions & 11 deletions DataCapture1/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
namespace = "com.zebra.datacapture1"
compileSdkVersion 34

defaultConfig {
applicationId "com.zebra.datacapture1"
minSdkVersion 23
targetSdkVersion 25
minSdkVersion 26
targetSdkVersion 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
Expand All @@ -19,12 +19,13 @@ android {
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation'com.android.support:appcompat-v7:25.2.0'
testImplementation 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.6.1'
}
5 changes: 2 additions & 3 deletions DataCapture1/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zebra.datacapture1">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand All @@ -9,7 +8,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity">
android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
Expand All @@ -26,6 +26,7 @@

import static android.provider.ContactsContract.Intents.Insert.ACTION;


public class MainActivity extends AppCompatActivity {

// DataWedge Sample supporting DataWedge APIs up to DW 7.0
Expand Down
6 changes: 3 additions & 3 deletions DataCapture1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.2.0' apply false
id 'com.android.library' version '7.2.0' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
id 'com.android.application' version '8.1.2' apply false
id 'com.android.library' version '8.1.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.20' apply false
}

task clean(type: Delete) {
Expand Down
19 changes: 17 additions & 2 deletions DataCapture1/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,24 @@

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8

# 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
org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.parallel=true


# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true

org.gradle.configuration-cache=true
org.gradle.configuration-cache.max-problems=5
3 changes: 2 additions & 1 deletion DataCapture1/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Wed Sep 14 16:29:45 EEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionPath=wrapper/dists
validateDistributionUrl=true
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
18 changes: 13 additions & 5 deletions DocumentCaptureSample1/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
namespace = "com.zebra.documentcapturesample1"

compileSdkVersion 34

defaultConfig {
applicationId "com.zebra.documentcapturesample1"
minSdkVersion 26
targetSdkVersion 29
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
Expand All @@ -18,8 +20,14 @@ android {
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
}
6 changes: 3 additions & 3 deletions DocumentCaptureSample1/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zebra.documentcapturesample1">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="com.symbol.datawedge.permission.contentprovider" />
<application
android:allowBackup="true"
Expand All @@ -9,7 +8,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="com.zebra.documentcapturesample1.MainActivity">
<activity android:name="com.zebra.documentcapturesample1.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
Loading