Skip to content

Commit 926de82

Browse files
committed
Update to new agp + new kotlin version
1 parent 2fe7b28 commit 926de82

File tree

52 files changed

+595
-229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+595
-229
lines changed

.github/workflows/pr.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "Pr workflow"
2+
3+
on:
4+
pull_request:
5+
types: [ opened, synchronize, edited, reopened ]
6+
branches:
7+
- master
8+
9+
concurrency:
10+
group: zebra-pr-${{ github.head_ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
env:
17+
GRADLE_OPTS: -Dorg.gradle.workers.max=4 -Dorg.gradle.parallel=true -Dkotlin.compiler.execution.strategy=in-process"
18+
19+
steps:
20+
- name: "Check out code"
21+
uses: actions/checkout@v4
22+
23+
- name: "Setup java"
24+
uses: actions/setup-java@v3
25+
with:
26+
distribution: 'zulu'
27+
java-version: 17
28+
29+
- uses: gradle/wrapper-validation-action@v1
30+
31+
- uses: gradle/gradle-build-action@v2
32+
33+
- name: "Build BasicIntent1"
34+
run: ./gradlew :BasicIntent1:app:assembleDebug :BasicIntent1:app:lintDebug
35+
36+
- name: "Build DataCapture1"
37+
run: ./gradlew :DataCapture1:app:assembleDebug :DataCapture1:app:lintDebug
38+
39+
- name: "Build DocumentCaptureSample1"
40+
run: ./gradlew :DocumentCaptureSample1:app:assembleDebug :DocumentCaptureSample1:app:lintDebug
41+
42+
- name: "Build FreeFormOCRSample1"
43+
run: ./gradlew :FreeFormOCRSample1:app:assembleDebug :FreeFormOCRSample1:app:lintDebug
44+
45+
- name: "Build SignatureCapture1"
46+
run: ./gradlew :SignatureCapture1:app:assembleDebug :SignatureCapture1:app:lintDebug
47+
48+
- name: "Build SignatureCapture2"
49+
run: ./gradlew :SignatureCapture2:app:assembleDebug :SignatureCapture2:app:lintDebug
50+
51+
- name: "Build TruckLoadingDemo"
52+
run: ./gradlew :TruckLoadingDemo:app:assembleDebug :TruckLoadingDemo:app:lintDebug
53+
54+
- name: "Upload reports"
55+
uses: actions/upload-artifact@v3
56+
if: failure()
57+
with:
58+
name: Reports
59+
path: '**/build/reports/*'
60+
retention-days: 2

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

BasicIntent1/app/build.gradle

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 28
4+
namespace = "com.zebra.basicintent1"
5+
compileSdkVersion 34
6+
57
defaultConfig {
68
applicationId "com.zebra.basicintent1"
7-
minSdkVersion 16
8-
targetSdkVersion 28
9+
minSdkVersion 26
10+
targetSdkVersion 34
911
versionCode 1
1012
versionName "1.0"
11-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1213
}
1314
buildTypes {
1415
release {
@@ -18,11 +19,14 @@ android {
1819
}
1920
}
2021

22+
java {
23+
toolchain {
24+
languageVersion.set(JavaLanguageVersion.of(17))
25+
}
26+
}
27+
2128
dependencies {
2229
implementation fileTree(dir: 'libs', include: ['*.jar'])
23-
implementation 'com.android.support:appcompat-v7:28.0.0'
24-
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
25-
testImplementation 'junit:junit:4.12'
26-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
27-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
30+
implementation 'androidx.appcompat:appcompat:1.6.1'
31+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
2832
}

BasicIntent1/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.zebra.basicintent1">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"
@@ -9,10 +8,10 @@
98
android:roundIcon="@mipmap/ic_launcher_round"
109
android:supportsRtl="true"
1110
android:theme="@style/AppTheme">
12-
<activity android:name=".MainActivity">
11+
<activity android:name=".MainActivity"
12+
android:exported="true">
1313
<intent-filter>
1414
<action android:name="android.intent.action.MAIN" />
15-
1615
<category android:name="android.intent.category.LAUNCHER" />
1716
</intent-filter>
1817
</activity>

BasicIntent1/app/src/main/java/com/zebra/basicintent1/MainActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
import android.content.Context;
1212
import android.content.Intent;
1313
import android.content.IntentFilter;
14-
import android.support.v7.app.AppCompatActivity;
14+
import androidx.appcompat.app.AppCompatActivity;
1515
import android.os.Bundle;
1616
import android.widget.TextView;
1717

18+
1819
public class MainActivity extends AppCompatActivity {
1920

2021
//

BasicIntent1/app/src/main/res/layout/activity_main.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
@@ -68,4 +68,4 @@
6868
app:layout_constraintStart_toEndOf="@+id/textView"
6969
app:layout_constraintTop_toBottomOf="@+id/lblScanData" />
7070

71-
</android.support.constraint.ConstraintLayout>
71+
</androidx.constraintlayout.widget.ConstraintLayout>

BasicIntent1/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
plugins {
3-
id 'com.android.application' version '7.2.0' apply false
4-
id 'com.android.library' version '7.2.0' apply false
5-
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
3+
id 'com.android.application' version '8.1.2' apply false
4+
id 'com.android.library' version '8.1.2' apply false
5+
id 'org.jetbrains.kotlin.android' version '1.9.20' apply false
66
}
77

88
task clean(type: Delete) {

BasicIntent1/gradle.properties

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,23 @@
66
# http://www.gradle.org/docs/current/userguide/build_environment.html
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
9-
org.gradle.jvmargs=-Xmx1536m
9+
org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8
1010
# When configured, Gradle will run in incubating parallel mode.
1111
# This option should only be used with decoupled projects. More details, visit
1212
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13-
# org.gradle.parallel=true
13+
14+
org.gradle.caching=true
15+
org.gradle.configureondemand=true
16+
org.gradle.parallel=true
17+
18+
# AndroidX package structure to make it clearer which packages are bundled with the
19+
# Android operating system, and which are packaged with your app's APK
20+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
21+
android.useAndroidX=true
22+
# Enables namespacing of each library's R class so that its R class includes only the
23+
# resources declared in the library itself and none from the library's dependencies,
24+
# thereby reducing the size of the R class for that library
25+
android.nonTransitiveRClass=true
26+
27+
org.gradle.configuration-cache=true
28+
org.gradle.configuration-cache.max-problems=5
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#Wed Sep 14 16:29:45 EEST 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
distributionPath=wrapper/dists
5+
validateDistributionUrl=true
56
zipStorePath=wrapper/dists
67
zipStoreBase=GRADLE_USER_HOME

DataCapture1/app/build.gradle

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 25
5-
buildToolsVersion "25.0.2"
4+
namespace = "com.zebra.datacapture1"
5+
compileSdkVersion 34
6+
67
defaultConfig {
78
applicationId "com.zebra.datacapture1"
8-
minSdkVersion 23
9-
targetSdkVersion 25
9+
minSdkVersion 26
10+
targetSdkVersion 34
1011
versionCode 1
1112
versionName "1.0"
12-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
}
1414
buildTypes {
1515
release {
@@ -19,12 +19,13 @@ android {
1919
}
2020
}
2121

22+
java {
23+
toolchain {
24+
languageVersion.set(JavaLanguageVersion.of(17))
25+
}
26+
}
27+
2228
dependencies {
2329
implementation fileTree(dir: 'libs', include: ['*.jar'])
24-
25-
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
26-
exclude group: 'com.android.support', module: 'support-annotations'
27-
})
28-
implementation'com.android.support:appcompat-v7:25.2.0'
29-
testImplementation 'junit:junit:4.12'
30+
implementation 'androidx.appcompat:appcompat:1.6.1'
3031
}

0 commit comments

Comments
 (0)