Skip to content

Commit

Permalink
Update to new agp + new kotlin version
Browse files Browse the repository at this point in the history
  • Loading branch information
erikeelde committed Nov 3, 2023
1 parent 2fe7b28 commit deeeb45
Show file tree
Hide file tree
Showing 43 changed files with 505 additions and 111 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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

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

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

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

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

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

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

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

- 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
14 changes: 11 additions & 3 deletions BasicIntent1/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
apply plugin: 'com.android.application'

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

defaultConfig {
applicationId "com.zebra.basicintent1"
minSdkVersion 16
Expand All @@ -18,10 +20,16 @@ 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'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
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'
Expand Down
3 changes: 1 addition & 2 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 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
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
13 changes: 10 additions & 3 deletions DataCapture1/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
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
Expand All @@ -19,12 +20,18 @@ 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'
implementation 'androidx.appcompat:appcompat:1.6.1'
testImplementation 'junit:junit:4.12'
}
3 changes: 1 addition & 2 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 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
16 changes: 12 additions & 4 deletions DocumentCaptureSample1/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
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
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'
}
3 changes: 1 addition & 2 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 Down
6 changes: 3 additions & 3 deletions DocumentCaptureSample1/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
47 changes: 27 additions & 20 deletions DocumentCaptureSample1/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# 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
# 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
# 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
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# 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 -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.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
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
Loading

0 comments on commit deeeb45

Please sign in to comment.