Skip to content

Commit 409f70c

Browse files
Revert load Yat config from the yat.properties file
1 parent ff9a3cb commit 409f70c

File tree

4 files changed

+3
-40
lines changed

4 files changed

+3
-40
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ local.properties
2323
# App secrets
2424
secret.properties
2525
sentry.properties
26-
yat.properties
27-
dropbox.properties
2826

2927
# Proguard folder generated by Eclipse
3028
proguard/

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,6 @@ https://jitpack.io/#yat-labs/yat-lib-android
111111

112112
}
113113
```
114-
115-
If you want to use the Sample Project and init Yat lib with your values, for your convenience, you can create the `yat.properties` file in the
116-
root of the project and add the following properties from the example:
117-
118-
```properties
119-
yat.name=Yat Labs
120-
yat.key=yat
121-
yat.returnUrl=app://y.at?action
122-
```
123114

124115
4. Add the code that handles deep links.
125116

yat-lib-example/build.gradle

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import java.nio.file.Files
2-
import java.nio.file.Paths
3-
41
plugins {
52
id 'com.android.application'
63
id 'kotlin-android'
@@ -16,11 +13,6 @@ android {
1613
compileSdk 34
1714
versionName versionNumber
1815

19-
def yatProperties = loadYatProps()
20-
buildConfigField("String", "YAT_ORGANIZATION_NAME", "\"${yatProperties.getProperty("yat.name")}\"")
21-
buildConfigField("String", "YAT_ORGANIZATION_KEY", "\"${yatProperties.getProperty("yat.key")}\"")
22-
buildConfigField("String", "YAT_ORGANIZATION_RETURN_URL", "\"${yatProperties.getProperty("yat.returnUrl")}\"")
23-
2416
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2517
}
2618

@@ -37,27 +29,9 @@ android {
3729

3830
buildFeatures {
3931
viewBinding true
40-
buildConfig true
4132
}
4233
}
4334

44-
Properties loadProps(fileName) {
45-
final File props = project.rootProject.file(fileName + ".properties")
46-
if (!props.exists()) {
47-
Files.copy(
48-
Paths.get(project.rootProject.file(fileName + "-example.properties").absolutePath),
49-
Paths.get(props.absolutePath),
50-
)
51-
}
52-
final Properties properties = new Properties()
53-
properties.load(props.newDataInputStream())
54-
return properties
55-
}
56-
57-
Properties loadYatProps() {
58-
return loadProps("yat")
59-
}
60-
6135
dependencies {
6236

6337
def coroutines_version = "1.7.3"

yat-lib-example/src/main/java/yat/yat_lib_example/MainActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ internal class MainActivity : AppCompatActivity(), YatIntegration.Delegate {
3636

3737
private fun initializeYatLib() {
3838
val config = YatConfiguration(
39-
appReturnLink = BuildConfig.YAT_ORGANIZATION_RETURN_URL,
40-
organizationName = BuildConfig.YAT_ORGANIZATION_NAME,
41-
organizationKey = BuildConfig.YAT_ORGANIZATION_KEY,
39+
organizationName = "",
40+
organizationKey = "",
41+
appReturnLink = "tari://y.at?action"
4242
)
4343

4444
YatIntegration.setup(

0 commit comments

Comments
 (0)