From 933f1aa9067af034445372a18113d7fec00d80a4 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 10 十月 2024 19:55:04 +0800
Subject: [PATCH] 0312 白包
---
Channel/Android/test/mainTemplate.gradle | 75 +++++++++++++++
Channel/Android/test/settingsTemplate.gradle | 37 +++++++
Channel/Android/test/google-services.json | 29 +++++
Channel/Android/test/baseProjectTemplate.gradle | 16 +++
Channel/Android/test/deps.gradle | 4
Channel/Android/test/launcherTemplate.gradle | 76 +++++++++++++++
Channel/Android/test/AndroidManifest.xml | 4
Channel/Android/test/LauncherManifest.xml | 33 ++++++
Channel/Android/test/gradleTemplate.properties | 7 +
9 files changed, 278 insertions(+), 3 deletions(-)
diff --git a/Channel/Android/test/AndroidManifest.xml b/Channel/Android/test/AndroidManifest.xml
index 6068870..1dad128 100644
--- a/Channel/Android/test/AndroidManifest.xml
+++ b/Channel/Android/test/AndroidManifest.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN-->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools">
- <application>
+ <application
+ android:allowNativeHeapPointerTagging="false">
<activity android:name="com.secondworld.sdk.GameActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
diff --git a/Channel/Android/test/LauncherManifest.xml b/Channel/Android/test/LauncherManifest.xml
new file mode 100644
index 0000000..5a978c2
--- /dev/null
+++ b/Channel/Android/test/LauncherManifest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.unity3d.player"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:installLocation="preferExternal">
+ <supports-screens
+ android:smallScreens="true"
+ android:normalScreens="true"
+ android:largeScreens="true"
+ android:xlargeScreens="true"
+ android:anyDensity="true"/>
+
+ <application android:label="@string/app_name"
+ android:icon="@mipmap/app_icon">
+ <activity
+ android:name="com.facebook.CustomTabActivity"
+ android:exported="false"
+ tools:replace="android:exported"
+ tools:ignore="AppLinkUrlError">
+
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.BROWSABLE" />
+
+ <data android:scheme="@string/fb_login_protocol_scheme"
+ tools:ignore="ManifestResource" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/Channel/Android/test/baseProjectTemplate.gradle b/Channel/Android/test/baseProjectTemplate.gradle
new file mode 100644
index 0000000..e9ff3ad
--- /dev/null
+++ b/Channel/Android/test/baseProjectTemplate.gradle
@@ -0,0 +1,16 @@
+plugins {
+ // If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity
+ // See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html
+ // See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
+ // To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
+ id 'com.android.application' version '7.1.2' apply false
+ id 'com.android.library' version '7.1.2' apply false
+ //id 'com.android.tools.build' version "7.3.0" apply false
+ id "com.google.gms.google-services" version "4.3.10" apply false
+ id 'com.google.firebase.crashlytics' version '2.8.1' apply false
+ **BUILD_SCRIPT_DEPS**
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/Channel/Android/test/deps.gradle b/Channel/Android/test/deps.gradle
index 77879b9..2e3ca6a 100644
--- a/Channel/Android/test/deps.gradle
+++ b/Channel/Android/test/deps.gradle
@@ -1 +1,3 @@
-//姝よ剼鏈负娓犻亾鐨勭涓夋柟杩滅▼渚濊禆搴撻厤缃紝浼氬鍒跺埌unity涓敤浜庢瀯寤�
+dependencies {
+
+}
diff --git a/Channel/Android/test/google-services.json b/Channel/Android/test/google-services.json
new file mode 100644
index 0000000..a1de6d7
--- /dev/null
+++ b/Channel/Android/test/google-services.json
@@ -0,0 +1,29 @@
+{
+ "project_info": {
+ "project_number": "375557197914",
+ "project_id": "djmx-eng",
+ "storage_bucket": "djmx-eng.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:375557197914:android:3d95564e01a49149e3c863",
+ "android_client_info": {
+ "package_name": "com.sjcsen.gp"
+ }
+ },
+ "oauth_client": [],
+ "api_key": [
+ {
+ "current_key": "AIzaSyDxFV-Si-ePkbHA_6tMOgxK1urcfdWGCYs"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": []
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/Channel/Android/test/gradleTemplate.properties b/Channel/Android/test/gradleTemplate.properties
new file mode 100644
index 0000000..b79e0bd
--- /dev/null
+++ b/Channel/Android/test/gradleTemplate.properties
@@ -0,0 +1,7 @@
+org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
+org.gradle.parallel=true
+android.useAndroidX=true
+## Automatically convert third-party libraries to use AndroidX
+android.enableJetifier=true
+unityStreamingAssets=.unity3d
+**ADDITIONAL_PROPERTIES**
diff --git a/Channel/Android/test/launcherTemplate.gradle b/Channel/Android/test/launcherTemplate.gradle
new file mode 100644
index 0000000..7bc79f3
--- /dev/null
+++ b/Channel/Android/test/launcherTemplate.gradle
@@ -0,0 +1,76 @@
+apply plugin: 'com.android.application'
+
+dependencies {
+ implementation project(':unityLibrary')
+ }
+
+android {
+ ndkPath "**NDKPATH**"
+
+ compileSdkVersion 34
+ buildToolsVersion '34.0.0'
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+
+ packagingOptions {exclude 'META-INF/rxjava.properties'}
+ defaultConfig {
+ minSdkVersion 24
+ targetSdkVersion 34
+ applicationId '**APPLICATIONID**'
+ ndk {
+ abiFilters **ABIFILTERS**
+ }
+ versionCode **VERSIONCODE**
+ versionName '**VERSIONNAME**'
+ }
+
+ aaptOptions {
+ noCompress = ['.unity3d', '.ress', '.resource', '.obb'] + unityStreamingAssets.tokenize(', ')
+ ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
+ }**SIGN**
+
+ lintOptions {
+ abortOnError false
+ checkReleaseBuilds false
+ }
+
+ buildTypes {
+ debug {
+ minifyEnabled **MINIFY_DEBUG**
+ proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
+ jniDebuggable true
+ }
+ release {
+ minifyEnabled **MINIFY_RELEASE**
+ proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
+ }
+ }**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
+**BUILT_APK_LOCATION**
+ bundle {
+ language {
+ enableSplit = false
+ }
+ density {
+ enableSplit = false
+ }
+ abi {
+ enableSplit = true
+ }
+ }
+}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**
+
+task copyJsonFile {
+ copy {
+ System.out.println("copy googlejson===============");
+ delete("./google-services.json")
+ from('../../../../../../../Assets/Plugins/Android/')
+ into('./')
+ include("google-services.json")
+ }
+}
+
+apply plugin: 'com.google.gms.google-services'
+apply plugin: 'com.google.firebase.crashlytics'
\ No newline at end of file
diff --git a/Channel/Android/test/mainTemplate.gradle b/Channel/Android/test/mainTemplate.gradle
new file mode 100644
index 0000000..fc83d39
--- /dev/null
+++ b/Channel/Android/test/mainTemplate.gradle
@@ -0,0 +1,75 @@
+apply plugin: 'com.android.library'
+**APPLY_PLUGINS**
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation(name: 'ald_v', ext: 'aar') //x.x.x为具体版本
+ //SDK基础能力
+ implementation 'com.appsflyer:af-android-sdk:6.9.0'
+ implementation 'com.android.installreferrer:installreferrer:2.2'
+ api 'androidx.annotation:annotation:1.5.0'
+ api 'androidx.core:core:1.6.0'
+ api 'androidx.percentlayout:percentlayout:1.0.0'
+ //google ID
+ implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
+ //firebase
+ implementation 'com.google.firebase:firebase-analytics'
+ implementation 'com.google.firebase:firebase-crashlytics'
+// implementation 'com.google.firebase:firebase-messaging' //不加了log会报FirebaseMessagingService缺失提示,但是并不影响上报
+ implementation platform('com.google.firebase:firebase-bom:31.2.2') {
+ exclude group: 'com.android.support', module: 'support-compat'
+ }
+ //base theme
+ api 'androidx.appcompat:appcompat:1.2.0'
+ //ald ui用
+ api 'androidx.cardview:cardview:1.0.0'
+ implementation('androidx.browser:browser:1.5.0')
+
+
+ //谷歌能力
+ implementation 'com.google.android.gms:play-services-auth:20.1.0' //google服务
+ implementation("com.android.billingclient:billing:7.0.0") // google内购
+ implementation 'androidx.percentlayout:percentlayout:1.0.0' //google提供的支持库
+ implementation 'com.google.android.play:review:2.0.1' //google评价
+
+ //facebook能力
+ implementation 'com.facebook.android:facebook-login:latest.release'
+ implementation 'com.facebook.android:facebook-share:latest.release'
+**DEPS**}
+
+android {
+ ndkPath "**NDKPATH**"
+
+ compileSdkVersion 34
+ buildToolsVersion '34.0.0'
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+
+ packagingOptions {exclude 'META-INF/rxjava.properties'}
+ defaultConfig {
+ minSdkVersion 24
+ targetSdkVersion 34
+ ndk {
+ abiFilters **ABIFILTERS**
+ }
+ versionCode **VERSIONCODE**
+ versionName '**VERSIONNAME**'
+ consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
+ }
+
+ lintOptions {
+ abortOnError false
+ checkReleaseBuilds false
+ }
+
+ aaptOptions {
+ noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
+ ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
+ }**PACKAGING_OPTIONS**
+}
+**IL_CPP_BUILD_SETUP**
+**SOURCE_BUILD_SETUP**
+**EXTERNAL_SOURCES**
diff --git a/Channel/Android/test/settingsTemplate.gradle b/Channel/Android/test/settingsTemplate.gradle
new file mode 100644
index 0000000..afbe7d6
--- /dev/null
+++ b/Channel/Android/test/settingsTemplate.gradle
@@ -0,0 +1,37 @@
+pluginManagement {
+ repositories {
+ **ARTIFACTORYREPOSITORY**
+ maven { url "https://jitpack.io" }
+ maven { url 'https://maven.aliyun.com/repository/releases' }
+ maven { url 'https://maven.aliyun.com/repository/jcenter' }
+ maven { url 'https://maven.aliyun.com/repository/google' }
+ maven { url 'https://maven.aliyun.com/repository/central' }
+ maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
+ maven { url 'https://maven.aliyun.com/repository/public' }
+ gradlePluginPortal()
+ google()
+ mavenCentral()
+ }
+}
+
+include ':launcher', ':unityLibrary'
+**INCLUDES**
+
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
+ repositories {
+ **ARTIFACTORYREPOSITORY**
+ maven { url "https://jitpack.io" }
+ maven { url 'https://maven.aliyun.com/repository/releases' }
+ maven { url 'https://maven.aliyun.com/repository/jcenter' }
+ maven { url 'https://maven.aliyun.com/repository/google' }
+ maven { url 'https://maven.aliyun.com/repository/central' }
+ maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
+ maven { url 'https://maven.aliyun.com/repository/public' }
+ google()
+ mavenCentral()
+ flatDir {
+ dirs "${project(':unityLibrary').projectDir}/libs"
+ }
+ }
+}
--
Gitblit v1.8.0