Skip to content

Commit f161ef8

Browse files
committed
refactor: examples
1 parent b01f85b commit f161ef8

File tree

80 files changed

+591
-68
lines changed

Some content is hidden

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

80 files changed

+591
-68
lines changed

.github/workflows/publishing-ios.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: iOS Publishing
22

33
on:
44
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
5+
tags: [ "*" ]
86

97
env:
108
CARGO_TERM_COLOR: always
@@ -32,8 +30,10 @@ jobs:
3230
uses: EndBug/[email protected]
3331
with:
3432
message: 'Bump new version'
35-
add: '*'
33+
author_name: release robot
34+
author_email: [email protected]
3635
cwd: './sdk-ios/client-sdk-ios/'
36+
push: 'origin main'
3737

3838

3939

examples/.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
File renamed without changes.

sdk-android/demo/build.gradle renamed to examples/app/build.gradle

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ android {
77
compileSdk 32
88

99
defaultConfig {
10-
applicationId "com.featureprobe.androidsdk"
10+
applicationId "com.featureprobe.demo"
1111
minSdk 21
1212
targetSdk 32
1313
versionCode 1
@@ -29,17 +29,20 @@ android {
2929
kotlinOptions {
3030
jvmTarget = '1.8'
3131
}
32+
buildFeatures {
33+
viewBinding true
34+
}
3235
}
3336

3437
dependencies {
35-
36-
implementation 'androidx.core:core-ktx:1.7.0'
37-
implementation 'androidx.appcompat:appcompat:1.4.1'
38-
implementation 'com.google.android.material:material:1.6.0'
39-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2'
40-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
4138
implementation "net.java.dev.jna:jna:5.7.0@aar"
4239
implementation 'com.featureprobe:client-sdk-android:1.2.0@aar'
40+
implementation 'androidx.core:core-ktx:1.7.0'
41+
implementation 'androidx.appcompat:appcompat:1.5.0'
42+
implementation 'com.google.android.material:material:1.6.1'
43+
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
44+
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
45+
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
4346
testImplementation 'junit:junit:4.13.2'
4447
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
4548
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
File renamed without changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.featureprobe.demo
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("com.featureprobe.demo", appContext.packageName)
23+
}
24+
}

sdk-android/demo/src/main/AndroidManifest.xml renamed to examples/app/src/main/AndroidManifest.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
34
package="com.featureprobe.demo">
4-
<uses-permission android:name="android.permission.INTERNET" />
5-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
5+
66
<application
77
android:allowBackup="true"
8+
android:dataExtractionRules="@xml/data_extraction_rules"
9+
android:fullBackupContent="@xml/backup_rules"
810
android:icon="@mipmap/ic_launcher"
911
android:label="@string/app_name"
1012
android:roundIcon="@mipmap/ic_launcher_round"
1113
android:supportsRtl="true"
12-
android:theme="@style/Theme.AndroidSdk" >
13-
14+
android:theme="@style/Theme.Demo"
15+
tools:targetApi="31">
1416
<activity
1517
android:name=".MainActivity"
16-
android:exported="true">
18+
android:exported="true"
19+
android:label="@string/app_name"
20+
android:theme="@style/Theme.Demo.NoActionBar">
1721
<intent-filter>
1822
<action android:name="android.intent.action.MAIN" />
1923

0 commit comments

Comments
 (0)