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 dependencies to the latest versions #88

Open
wants to merge 4 commits 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
6 changes: 2 additions & 4 deletions MLKit-Sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ buildscript {
maven { url "https://developer.huawei.com/repo/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.huawei.agconnect:agcp:1.4.2.300'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.huawei.agconnect:agcp:1.7.1.300'
}
}

Expand Down
2 changes: 1 addition & 1 deletion MLKit-Sample/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
45 changes: 22 additions & 23 deletions MLKit-Sample/module-body/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
buildToolsVersion "29.0.3"
compileSdkVersion 33
defaultConfig {
applicationId "com.mlkit.sample.body"
minSdkVersion 19
targetSdkVersion 30
targetSdkVersion 33
versionCode 3200300
versionName "3.2.0.300"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -43,41 +42,41 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.aar'])
implementation 'com.huawei.hms:ml-computer-vision-cloud:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-cloud:3.5.0.301'

// Face
implementation 'com.huawei.hms:ml-computer-vision-face:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-face-emotion-model:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-face-feature-model:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-face-shape-point-model:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-face-3d-model:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-face:3.5.0.302'
implementation 'com.huawei.hms:ml-computer-vision-face-emotion-model:3.5.0.302'
implementation 'com.huawei.hms:ml-computer-vision-face-feature-model:3.5.0.302'
implementation 'com.huawei.hms:ml-computer-vision-face-shape-point-model:3.5.0.302'
implementation 'com.huawei.hms:ml-computer-vision-face-3d-model:3.5.0.302'

// Skeleton detection SDK.
implementation 'com.huawei.hms:ml-computer-vision-skeleton:2.0.4.300'
implementation 'com.huawei.hms:ml-computer-vision-skeleton:3.5.0.300'
// Skeleton detection model.
implementation 'com.huawei.hms:ml-computer-vision-skeleton-model:2.0.4.300'
implementation 'com.huawei.hms:ml-computer-vision-skeleton-model:3.5.0.300'
// Yoga detection model.
implementation 'com.huawei.hms:ml-computer-vision-yoga-model:2.0.4.300'
implementation 'com.huawei.hms:ml-computer-vision-yoga-model:3.5.0.300'

// Liveness Detection sdk and FULL SDK
implementation 'com.huawei.hms:ml-computer-vision-livenessdetection:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-vision-livenessdetection:3.6.0.300'

// handkeypoint
implementation'com.huawei.hms:ml-computer-vision-handkeypoint:2.1.0.300'
implementation'com.huawei.hms:ml-computer-vision-handkeypoint-model:2.1.0.300'
implementation 'com.huawei.hms:ml-computer-vision-gesture-model:2.1.0.300'
implementation'com.huawei.hms:ml-computer-vision-handkeypoint:3.5.0.301'
implementation'com.huawei.hms:ml-computer-vision-handkeypoint-model:3.5.0.301'
implementation 'com.huawei.hms:ml-computer-vision-gesture-model:3.5.0.301'

//faceVerification
implementation 'com.huawei.hms:ml-computer-vision-faceverify:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-vision-faceverify-model:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-vision-faceverify:3.6.0.304'
implementation 'com.huawei.hms:ml-computer-vision-faceverify-model:3.6.0.304'

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

testImplementation 'junit:junit:4.13.1'
testImplementation 'junit:junit:4.13.2'
}
apply plugin: 'com.huawei.agconnect'
3 changes: 2 additions & 1 deletion MLKit-Sample/module-body/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity android:name=".activity.StartActivity">
<activity android:name=".activity.StartActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public LensEngine(Activity activity, CameraConfiguration configuration, GraphicO
public void release() {
synchronized (this.transactorLock) {
this.stop();
this.transactingRunnable.release();
if (this.frameTransactor != null) {
this.frameTransactor.stop();
this.frameTransactor = null;
Expand Down Expand Up @@ -245,16 +244,6 @@ private class FrameTransactingRunnable implements Runnable {
FrameTransactingRunnable() {
}

/**
* Frees the transactor and can safely perform this operation only after the associated thread has completed.
*/
@SuppressLint("Assert")
void release() {
synchronized (this.lock) {
assert (LensEngine.this.transactingThread.getState() == State.TERMINATED);
}
}

void setActive(boolean active) {
synchronized (this.lock) {
this.active = active;
Expand Down
23 changes: 11 additions & 12 deletions MLKit-Sample/module-costom/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
buildToolsVersion "29.0.3"
compileSdkVersion 33

defaultConfig {
applicationId "com.huawei.mlkit.sample.custom"
minSdkVersion 19
targetSdkVersion 30
targetSdkVersion 33
versionCode 3200300
versionName "3.2.0.300"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -34,18 +33,18 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
// Custom model
implementation 'com.huawei.hms:ml-computer-model-executor:2.1.0.301'
implementation 'com.huawei.hms:ml-computer-model-executor:3.5.0.301'
implementation 'mindspore:mindspore-lite:5.0.5.300'


implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.6.1'

}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public LensEngine(Activity activity, CameraConfiguration configuration, GraphicO
public void release() {
synchronized (this.transactorLock) {
this.stop();
this.transactingRunnable.release();
if (this.frameTransactor != null) {
this.frameTransactor.stop();
this.frameTransactor = null;
Expand Down Expand Up @@ -246,16 +245,6 @@ private class FrameTransactingRunnable implements Runnable {
FrameTransactingRunnable() {
}

/**
* Frees the transactor and can safely perform this operation only after the associated thread has completed.
*/
@SuppressLint("Assert")
void release() {
synchronized (this.lock) {
assert (LensEngine.this.transactingThread.getState() == State.TERMINATED);
}
}

void setActive(boolean active) {
synchronized (this.lock) {
this.active = active;
Expand Down
63 changes: 31 additions & 32 deletions MLKit-Sample/module-text/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
buildToolsVersion "29.0.3"
compileSdkVersion 33
defaultConfig {
applicationId "com.mlkit.sample.text"
minSdkVersion 19
targetSdkVersion 30
targetSdkVersion 33
versionCode 3200300
versionName "3.2.0.300"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -45,67 +44,67 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.aar'])

implementation 'com.huawei.hms:ml-computer-vision-cloud:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-cloud:3.5.0.301'

// Text recognition.
implementation 'com.huawei.hms:ml-computer-vision-ocr:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-ocr-cn-model:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-ocr-jk-model:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-ocr-latin-model:2.0.5.300'
implementation 'com.huawei.hms:ml-computer-vision-ocr:3.6.0.300'
implementation 'com.huawei.hms:ml-computer-vision-ocr-cn-model:3.6.0.300'
implementation 'com.huawei.hms:ml-computer-vision-ocr-jk-model:3.6.0.300'
implementation 'com.huawei.hms:ml-computer-vision-ocr-latin-model:3.6.0.300'


// Text Embedding
implementation 'com.huawei.hms:ml-nlp-textembedding:2.0.4.300'
implementation 'com.huawei.hms:ml-nlp-textembedding:3.5.0.300'

// General card recognition .
implementation 'com.huawei.hms:ml-computer-card-gcr-plugin:2.0.1.301'
implementation 'com.huawei.hms:ml-computer-card-gcr-plugin:3.5.0.301'

// Chinese ID card recognition.
implementation 'com.huawei.hms:ml-computer-card-icr-cn:2.0.3.303'
implementation 'com.huawei.hms:ml-computer-card-icr-cn:3.5.0.300'

// Vietnam ID card recognition fullSDK.
implementation 'com.huawei.hms:ml-computer-card-icr-vn:2.1.0.301'
implementation 'com.huawei.hms:ml-computer-card-icr-vn:3.5.0.300'

// Bank card recognition .
implementation 'com.huawei.hms:ml-computer-card-bcr:2.0.3.301'
implementation 'com.huawei.hms:ml-computer-card-bcr:3.5.0.300'

// Audio file transcription.
implementation 'com.huawei.hms:ml-computer-voice-aft:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-voice-aft:3.5.0.300'

// download.
implementation 'com.huawei.hms:ml-computer-model-download:2.0.4.300'
implementation 'com.huawei.hms:ml-computer-model-download:3.5.0.301'

// Text to speech.
implementation 'com.huawei.hms:ml-computer-voice-tts:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-voice-tts-model-bee:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-voice-tts-model-eagle:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-voice-tts:3.6.0.300'
implementation 'com.huawei.hms:ml-computer-voice-tts-model-bee:3.6.0.300'
implementation 'com.huawei.hms:ml-computer-voice-tts-model-eagle:3.6.0.300'


// Automatic speech recognition Long voice.
implementation 'com.huawei.hms:ml-computer-voice-realtimetranscription:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-voice-realtimetranscription:3.5.0.303'

// Automatic speech recognition
implementation 'com.huawei.hms:ml-computer-voice-asr:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-voice-asr-plugin:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-voice-asr:3.5.0.301'
implementation 'com.huawei.hms:ml-computer-voice-asr-plugin:3.5.0.301'

// Text translation.
implementation 'com.huawei.hms:ml-computer-language-detection:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-language-detection-model:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-translate:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-translate-model:2.2.0.300'
implementation 'com.huawei.hms:ml-computer-language-detection:3.6.0.312'
implementation 'com.huawei.hms:ml-computer-language-detection-model:3.6.0.312'
implementation 'com.huawei.hms:ml-computer-translate:3.6.0.312'
implementation 'com.huawei.hms:ml-computer-translate-model:3.6.0.312'

// Sound Dect.
implementation 'com.huawei.hms:ml-speech-semantics-sounddect-model:2.1.0.300'
implementation 'com.huawei.hms:ml-speech-semantics-sounddect-sdk:2.1.0.300'
implementation 'com.huawei.hms:ml-speech-semantics-sounddect-model:3.5.0.302'
implementation 'com.huawei.hms:ml-speech-semantics-sounddect-sdk:3.5.0.302'

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0'
implementation 'androidx.lifecycle:lifecycle-runtime:2.5.1'
implementation 'androidx.multidex:multidex:2.0.1'
}
apply plugin: 'com.huawei.agconnect'
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/**
* Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.huawei.mlkit.sample.activity.sounddect;
Expand All @@ -29,8 +29,8 @@
import android.widget.TextView;
import android.widget.Toast;

import com.huawei.hms.mlsdk.sounddect.MLSoundDectListener;
import com.huawei.hms.mlsdk.sounddect.MLSoundDector;
import com.huawei.hms.mlsdk.sounddect.MLSoundDetectListener;
import com.huawei.hms.mlsdk.sounddect.MLSoundDetector;
import com.huawei.mlkit.sample.R;

import java.text.DecimalFormat;
Expand All @@ -57,12 +57,12 @@ public class SoundDectActivity extends AppCompatActivity implements View.OnClick
private long baseTimer;
private TimerHandler timerHandler;
private Vector<String> logList;
private MLSoundDector soundDector;
private MLSoundDetector soundDector;

private MLSoundDectListener listener = new MLSoundDectListener() {
private MLSoundDetectListener listener = new MLSoundDetectListener() {
@Override
public void onSoundSuccessResult(Bundle result) {
int voiceType = result.getInt(MLSoundDector.RESULTS_RECOGNIZED);
int voiceType = result.getInt(MLSoundDetector.RESULTS_RECOGNIZED);
if (voiceType > 0 && voiceType < 13) {
logList.add(type[voiceType]);
}
Expand Down Expand Up @@ -102,8 +102,8 @@ protected void onCreate(Bundle savedInstanceState) {
}

private void initModel() {
soundDector = MLSoundDector.createSoundDector();
soundDector.setSoundDectListener(listener);
soundDector = MLSoundDetector.createSoundDetector();
soundDector.setSoundDetectListener(listener);
}

@Override
Expand Down Expand Up @@ -144,7 +144,7 @@ public void onClick(View view) {

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
@NonNull int[] grantResults) {
@NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == RC_RECORD_CODE && grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
boolean startSuccess = soundDector.start(SoundDectActivity.this);
Expand Down
Loading