This repository was archived by the owner on Apr 16, 2025. It is now read-only.
File tree 4 files changed +43
-6
lines changed
4 files changed +43
-6
lines changed Original file line number Diff line number Diff line change 18
18
jobs :
19
19
build-octopus-demo :
20
20
runs-on : ubuntu-latest
21
+ strategy :
22
+ matrix :
23
+ java-version : [11, 17, 21]
24
+ include :
25
+ - java-version : 11
26
+ gradle-version : 6.5
27
+ agp-version : 4.1.3
28
+ - java-version : 17
29
+ gradle-version : 7.5
30
+ agp-version : 7.4.2
31
+ - java-version : 21
32
+ gradle-version : 8.5
33
+ agp-version : 8.2.2
34
+
21
35
defaults :
22
36
run :
23
37
working-directory : demo/android/OctopusDemo
24
38
25
39
steps :
26
40
- uses : actions/checkout@v3
41
+
27
42
28
- - name : set up JDK 17
43
+ - name : Override gradle settings
44
+ run : sed -i "s/com.android.tools.build:gradle:[0-9]*\.[0-9]*\.[0-9]*/com.android.tools.build:gradle:${{ matrix.agp-version }}/g" build.gradle
45
+
46
+ - name : set up JDK ${{ matrix.java-version }}
29
47
uses : actions/setup-java@v3
30
48
with :
31
- java-version : ' 17 '
49
+ java-version : ${{ matrix.java-version }}
32
50
distribution : ' temurin'
51
+
52
+ - name : Use Gradle ${{ matrix.gradle-version }}
53
+ uses : gradle/actions/setup-gradle@v3
54
+ with :
55
+ gradle-version : ${{ matrix.gradle-version }}
33
56
34
57
- name : Build
35
- run : ./gradlew assembleDebug
58
+ run : gradle assembleDebug
Original file line number Diff line number Diff line change @@ -15,3 +15,5 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
15
15
# Android operating system, and which are packaged with your app"s APK
16
16
# https://developer.android.com/topic/libraries/support-library/androidx-rn
17
17
android.useAndroidX =true
18
+ android.nonTransitiveRClass =false
19
+
Original file line number Diff line number Diff line change 1
1
apply plugin : ' com.android.application'
2
2
android {
3
+ def agpVersion = com.android.Version . ANDROID_GRADLE_PLUGIN_VERSION
3
4
compileSdk defaultTargetSdkVersion
4
5
5
6
defaultConfig {
@@ -18,10 +19,20 @@ android {
18
19
proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
19
20
}
20
21
}
21
- lint {
22
+
23
+ buildFeatures {
24
+ buildConfig true
25
+ }
26
+ compileOptions {
27
+ sourceCompatibility JavaVersion . VERSION_1_8
28
+ targetCompatibility JavaVersion . VERSION_1_8
29
+ }
30
+ lintOptions {
22
31
abortOnError false
23
32
}
24
- namespace ' ai.picovoice.octopusdemo'
33
+ if (agpVersion. tokenize(' .' )[0 ]. toInteger() >= 7 ) {
34
+ namespace ' ai.picovoice.octopusdemo'
35
+ }
25
36
}
26
37
27
38
dependencies {
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
- <manifest xmlns : android =" http://schemas.android.com/apk/res/android" >
2
+ <manifest xmlns : android =" http://schemas.android.com/apk/res/android"
3
+ package =" ai.picovoice.octopusdemo" >
3
4
4
5
<uses-permission android : name =" android.permission.INTERNET" />
5
6
<uses-permission android : name =" android.permission.RECORD_AUDIO" />
You can’t perform that action at this time.
0 commit comments