Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 324584a

Browse files
committed
save before androidx
1 parent 6fc3b12 commit 324584a

File tree

17 files changed

+100465
-82
lines changed

17 files changed

+100465
-82
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.pythonPath": "/usr/local/Caskroom/miniconda/base/envs/tf-nightly/bin/python"
3+
}

app/build.gradle

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
apply plugin: 'com.android.application'
2+
apply plugin: 'kotlin-android-extensions'
3+
apply plugin: 'kotlin-android'
24

35
android {
46
compileSdkVersion 29
@@ -32,7 +34,7 @@ android {
3234
// Probably you haven't set ANDROID_HOME. To fix:
3335
// export ANDROID_HOME=$HOME/Android/Sdk # Your Android SDK path.
3436
lintOptions {
35-
abortOnError false
37+
abortOnError false
3638
}
3739
}
3840

@@ -53,18 +55,28 @@ dependencies {
5355
implementation 'com.google.guava:guava:28.1-android'
5456
// implementation 'org.tensorflow:tensorflow-lite:2.0.0'
5557
// implementation 'org.tensorflow:tensorflow-lite-select-tf-ops:0.0.0-nightly'
56-
compile(name:'tensorflow-lite-with-select-tf-ops-0.0.0-nightly', ext:'aar')
58+
compile(name: 'tensorflow-lite-with-select-tf-ops-0.0.0-nightly', ext: 'aar')
5759

5860
testImplementation 'junit:junit:4.12'
5961
testImplementation 'androidx.test:core:1.2.0'
6062
testImplementation 'com.google.truth:truth:1.0'
6163
testImplementation 'org.robolectric:robolectric:4.3.1'
6264
androidTestImplementation 'androidx.test:runner:1.2.0'
6365
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
66+
67+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
68+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2'
69+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'
70+
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-rc02'
71+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0-rc02'
72+
// implementation 'androidx.activity:activity-ktx:1.1.0-rc02'
73+
// implementation 'androidx.core:core-ktx:1.2.0-rc01'
74+
// implementation 'androidx.fragment:fragment-ktx:1.2.0-rc02'
6475
}
6576

6677
repositories {
6778
flatDir {
6879
dirs 'libs'
6980
}
81+
mavenCentral()
7082
}

app/src/main/AndroidManifest.xml

Lines changed: 33 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,36 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!--
3-
Copyright 2019 The TensorFlow Authors. All Rights Reserved.
4-
5-
Licensed under the Apache License, Version 2.0 (the "License");
6-
you may not use this file except in compliance with the License.
7-
You may obtain a copy of the License at
8-
9-
http://www.apache.org/licenses/LICENSE-2.0
10-
11-
Unless required by applicable law or agreed to in writing, software
12-
distributed under the License is distributed on an "AS IS" BASIS,
13-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
See the License for the specific language governing permissions and
15-
limitations under the License.
16-
-->
172
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
183
xmlns:tools="http://schemas.android.com/tools"
19-
package="co.huggingface.android_transformers.bertqa">
20-
21-
<application
22-
android:allowBackup="true"
23-
android:icon="@drawable/ic_launcher"
24-
android:label="@string/app_name"
25-
android:roundIcon="@drawable/ic_launcher"
26-
android:supportsRtl="true"
27-
android:theme="@style/AppTheme"
28-
tools:ignore="GoogleAppIndexingWarning">
29-
30-
<activity
31-
android:name=".ui.QaActivity"
32-
android:exported="false">
33-
<meta-data
34-
android:name="android.support.PARENT_ACTIVITY"
35-
android:value="co.huggingface.android_transformers.bertqa.ui.DatasetListActivity" />
36-
</activity>
37-
38-
<activity
39-
android:name=".ui.DatasetListActivity"
40-
android:exported="true"
41-
android:theme="@style/AppTheme.NoTitleActivity" >
42-
<intent-filter>
43-
<action android:name="android.intent.action.MAIN" />
44-
<category android:name="android.intent.category.LAUNCHER" />
45-
</intent-filter>
46-
</activity>
47-
48-
</application>
49-
50-
</manifest>
51-
4+
package="co.huggingface.android_transformers">
5+
6+
<application
7+
android:allowBackup="true"
8+
android:icon="@drawable/ic_launcher"
9+
android:label="@string/app_name"
10+
android:roundIcon="@drawable/ic_launcher"
11+
android:supportsRtl="true"
12+
android:theme="@style/AppTheme"
13+
tools:ignore="GoogleAppIndexingWarning">
14+
<activity
15+
android:name=".gpt2.ui.GPT2Activity"
16+
android:theme="@style/AppTheme.NoActionBar"></activity>
17+
<activity
18+
android:name=".bertqa.ui.QaActivity"
19+
android:exported="false">
20+
<meta-data
21+
android:name="android.support.PARENT_ACTIVITY"
22+
android:value="co.huggingface.android_transformers.bertqa.ui.DatasetListActivity" />
23+
</activity>
24+
<activity
25+
android:name=".bertqa.ui.DatasetListActivity"
26+
android:exported="true"
27+
android:theme="@style/AppTheme.NoTitleActivity">
28+
<intent-filter>
29+
<action android:name="android.intent.action.MAIN" />
30+
31+
<category android:name="android.intent.category.LAUNCHER" />
32+
</intent-filter>
33+
</activity>
34+
</application>
35+
36+
</manifest>

0 commit comments

Comments
 (0)