update:ChannelConfig 更新

This commit is contained in:
2026-07-14 20:20:03 +08:00
parent 2107f437a7
commit 7fe8ed85ec
64 changed files with 521 additions and 1367 deletions

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application tools:overrideLibrary="com.tuyoo.gamesdk">
</application>
</manifest>

View File

@@ -0,0 +1,13 @@
dependencies {
implementation(platform("ru.rustore.sdk:bom:2025.11.01"))
implementation("ru.rustore.sdk:pay")
implementation "ru.rustore.sdk:review:10.0.0"
implementation "com.vk.id:vkid:2.5.1"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
}
android {
compileOptions {
coreLibraryDesugaringEnabled true
}
}

View File

@@ -0,0 +1,13 @@
dependencyResolutionManagement {
repositories {
maven {
url "https://artifactory-external.vkpartner.ru/artifactory/vkid-sdk-android/"
}
maven {
url "https://artifactory-external.vkpartner.ru/artifactory/maven/"
}
maven {
url "https://artifactory-external.vkpartner.ru/artifactory/vk-id-captcha/android/"
}
}
}

View File

@@ -0,0 +1,46 @@
package com.unity3d.player;
import android.util.Log;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.Locale;
public class RustoreAdapter extends ChannelAdapterBase {
private static final String TAG = "RustoreAdapter";
@Override
public String normalizeSkuList(String msg) {
if (msg == null || msg.isEmpty()) {
return msg;
}
try {
JSONArray products = new JSONArray(msg);
for (int i = 0; i < products.length(); i++) {
JSONObject p = products.getJSONObject(i);
String price = p.optString("price", "0");
long micros = Long.parseLong(price) * 10000;
p.put("price_amount_micros", String.valueOf(micros));
String currency = p.optString("currency", "");
if (!currency.isEmpty()) {
p.put("price_currency_code", currency);
}
float rubles = Float.parseFloat(price) / 100;
p.put("price", String.format(Locale.US, "RUB %.2f", rubles));
}
return products.toString();
} catch (Exception e) {
Log.e(TAG, "normalizeSkuList error: " + e.getMessage());
return msg;
}
}
private static class Config {
public String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.rustore.FishingTravel";
}
}