From 86d28c0e8f5e67f984d7a1935361e3b64b91ed65 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期一, 11 十二月 2023 16:09:26 +0800 Subject: [PATCH] 0312 quick海外sdk --- Channel/Android/mlgtgame_quickhw/deps.gradle | 3 Channel/Android/mlgtgame_quickhw/launcherTemplate.gradle | 76 +++++++++++++++++++ Channel/Android/mlgtgame_quickhw/release/libs/library-release-mlgtgame_quickhw.aar | 0 Channel/Android/mlgtgame_quickhw/gradleTemplate.properties | 7 + Channel/Android/mlgtgame_quickhw/google-services.json | 29 +++++++ Channel/Android/mlgtgame_quickhw/baseProjectTemplate.gradle | 32 ++++++++ Channel/Android/mlgtgame_quickhw/debug/libs/library-debug-mlgtgame_quickhw.aar | 0 Channel/Android/mlgtgame_quickhw/mainTemplate.gradle | 51 ++++++++++++ Channel/Android/mlgtgame_quickhw/AndroidManifest.xml | 17 ++++ 9 files changed, 215 insertions(+), 0 deletions(-) diff --git a/Channel/Android/mlgtgame_quickhw/AndroidManifest.xml b/Channel/Android/mlgtgame_quickhw/AndroidManifest.xml new file mode 100644 index 0000000..1dad128 --- /dev/null +++ b/Channel/Android/mlgtgame_quickhw/AndroidManifest.xml @@ -0,0 +1,17 @@ +<?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"> + <application + android:allowNativeHeapPointerTagging="false"> + <activity android:name="com.secondworld.sdk.GameActivity" + android:theme="@style/UnityThemeSelector"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + <meta-data android:name="unityplayer.UnityActivity" android:value="true" /> + </activity> + </application> +</manifest> diff --git a/Channel/Android/mlgtgame_quickhw/baseProjectTemplate.gradle b/Channel/Android/mlgtgame_quickhw/baseProjectTemplate.gradle new file mode 100644 index 0000000..9dc386c --- /dev/null +++ b/Channel/Android/mlgtgame_quickhw/baseProjectTemplate.gradle @@ -0,0 +1,32 @@ +// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN + +allprojects { + buildscript { + repositories {**ARTIFACTORYREPOSITORY** + google() + jcenter() + } + + dependencies { + // 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 + classpath 'com.android.tools.build:gradle:4.0.1' + classpath 'com.google.gms:google-services:4.2.0' + **BUILD_SCRIPT_DEPS** + } + } + + repositories {**ARTIFACTORYREPOSITORY** + google() + jcenter() + flatDir { + dirs "${project(':unityLibrary').projectDir}/libs" + } + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/Channel/Android/mlgtgame_quickhw/debug/libs/library-debug-mlgtgame_quickhw.aar b/Channel/Android/mlgtgame_quickhw/debug/libs/library-debug-mlgtgame_quickhw.aar new file mode 100644 index 0000000..75f4afe --- /dev/null +++ b/Channel/Android/mlgtgame_quickhw/debug/libs/library-debug-mlgtgame_quickhw.aar Binary files differ diff --git a/Channel/Android/mlgtgame_quickhw/deps.gradle b/Channel/Android/mlgtgame_quickhw/deps.gradle new file mode 100644 index 0000000..2e3ca6a --- /dev/null +++ b/Channel/Android/mlgtgame_quickhw/deps.gradle @@ -0,0 +1,3 @@ +dependencies { + +} diff --git a/Channel/Android/mlgtgame_quickhw/google-services.json b/Channel/Android/mlgtgame_quickhw/google-services.json new file mode 100644 index 0000000..8834029 --- /dev/null +++ b/Channel/Android/mlgtgame_quickhw/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "732138931273", + "project_id": "djmx666-b7853", + "storage_bucket": "djmx666-b7853.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:732138931273:android:739ec3eaddfaaf4a73eb98", + "android_client_info": { + "package_name": "com.huanyou.djmx.gp" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyBg1OT3J7ClBNviEYrL3S6gXkWIUNvjYjs" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/Channel/Android/mlgtgame_quickhw/gradleTemplate.properties b/Channel/Android/mlgtgame_quickhw/gradleTemplate.properties new file mode 100644 index 0000000..b79e0bd --- /dev/null +++ b/Channel/Android/mlgtgame_quickhw/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/mlgtgame_quickhw/launcherTemplate.gradle b/Channel/Android/mlgtgame_quickhw/launcherTemplate.gradle new file mode 100644 index 0000000..2e01755 --- /dev/null +++ b/Channel/Android/mlgtgame_quickhw/launcherTemplate.gradle @@ -0,0 +1,76 @@ +apply plugin: 'com.android.application' + +dependencies { + implementation project(':unityLibrary') + } + +android { + compileSdkVersion **APIVERSION** + buildToolsVersion '33.0.0' + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + packagingOptions {exclude 'META-INF/rxjava.properties'} + + defaultConfig { + minSdkVersion **MINSDKVERSION** + targetSdkVersion **TARGETSDKVERSION** + 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** + useProguard **PROGUARD_DEBUG** + proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG** + jniDebuggable true + } + release { + minifyEnabled **MINIFY_RELEASE** + useProguard **PROGUARD_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' \ No newline at end of file diff --git a/Channel/Android/mlgtgame_quickhw/mainTemplate.gradle b/Channel/Android/mlgtgame_quickhw/mainTemplate.gradle new file mode 100644 index 0000000..94944a1 --- /dev/null +++ b/Channel/Android/mlgtgame_quickhw/mainTemplate.gradle @@ -0,0 +1,51 @@ +apply plugin: 'com.android.library' +//**APPLY_PLUGINS** +apply from: 'deps.gradle' + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation('androidx.appcompat:appcompat:1.0.0') { + force = true + } + + implementation(name: 'quickgame_hw_2.3.3', ext: 'aar') //x.x.x涓哄叿浣撶増鏈� + implementation 'com.android.billingclient:billing:5.2.1'//google鍐呰喘 + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.10" +//浠ヤ笅涓洪�夋帴搴� +//璋锋瓕鐧诲綍 + implementation 'com.google.android.gms:play-services-auth:19.0.0' +//Facebook + implementation 'com.facebook.android:facebook-android-sdk:16.0.0' +**DEPS**} + +android { + compileSdkVersion **APIVERSION** + buildToolsVersion '33.0.0' + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + defaultConfig { + minSdkVersion **MINSDKVERSION** + targetSdkVersion **TARGETSDKVERSION** + ndk { + abiFilters **ABIFILTERS** + } + versionCode **VERSIONCODE** + versionName '**VERSIONNAME**' + consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD** + } + + lintOptions { + abortOnError false + checkReleaseBuilds false + } + + aaptOptions { + ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~" + }**PACKAGING_OPTIONS** +}**REPOSITORIES****SOURCE_BUILD_SETUP** +**EXTERNAL_SOURCES** diff --git a/Channel/Android/mlgtgame_quickhw/release/libs/library-release-mlgtgame_quickhw.aar b/Channel/Android/mlgtgame_quickhw/release/libs/library-release-mlgtgame_quickhw.aar new file mode 100644 index 0000000..d5ae54e --- /dev/null +++ b/Channel/Android/mlgtgame_quickhw/release/libs/library-release-mlgtgame_quickhw.aar Binary files differ -- Gitblit v1.8.0