update sth for pad
This commit is contained in:
parent
132c24eda4
commit
844006ed16
File diff suppressed because one or more lines are too long
@ -9,8 +9,19 @@ plugins {
|
|||||||
android {
|
android {
|
||||||
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
|
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
|
||||||
buildToolsVersion PROP_BUILD_TOOLS_VERSION
|
buildToolsVersion PROP_BUILD_TOOLS_VERSION
|
||||||
// assetPacks = [":install-time-asset_pack"] //PAD资源分发
|
assetPacks = [":UnityDataAssetPack"] //PAD资源分发
|
||||||
ndkVersion "21.3.6528147"
|
ndkVersion "21.3.6528147"
|
||||||
|
bundle {
|
||||||
|
language {
|
||||||
|
enableSplit = false
|
||||||
|
}
|
||||||
|
density {
|
||||||
|
enableSplit = false
|
||||||
|
}
|
||||||
|
abi {
|
||||||
|
enableSplit = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.cege.games.release"
|
applicationId "com.cege.games.release"
|
||||||
@ -97,24 +108,24 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
android.applicationVariants.all { variant ->
|
//android.applicationVariants.all { variant ->
|
||||||
// delete previous files first
|
// delete previous files first
|
||||||
delete "${buildDir}/intermediates/merged_assets/${variant.dirName}"
|
// delete "${buildDir}/intermediates/merged_assets/${variant.dirName}"
|
||||||
|
//
|
||||||
variant.mergeAssetsProvider.get().doLast {
|
// variant.mergeAssetsProvider.get().doLast {
|
||||||
def sourceDir = rootProject.ext.cfgs.jsFilePath
|
// def sourceDir = rootProject.ext.cfgs.jsFilePath
|
||||||
|
//
|
||||||
copy{
|
// copy{
|
||||||
from "${sourceDir}"
|
// from "${sourceDir}"
|
||||||
include "Data/js/**"
|
// include "Data/js/**"
|
||||||
into outputDir
|
// into outputDir
|
||||||
}
|
// }
|
||||||
copy {
|
// copy {
|
||||||
from "${sourceDir}/cert/cacert.pem"
|
// from "${sourceDir}/cert/cacert.pem"
|
||||||
into outputDir
|
// into outputDir
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -77,6 +77,7 @@ import org.cocos2dx.lib.Cocos2dxHelper;
|
|||||||
import org.cocos2dx.lib.CocosJSHelper;
|
import org.cocos2dx.lib.CocosJSHelper;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -156,10 +157,6 @@ public class MainActivity extends UnityPlayerActivity
|
|||||||
private FirebaseAnalytics mFirebaseAnalytics;
|
private FirebaseAnalytics mFirebaseAnalytics;
|
||||||
private AppEventsLogger fbLogger;
|
private AppEventsLogger fbLogger;
|
||||||
|
|
||||||
protected String updateUnityCommandLineArguments(String cmdLine) {
|
|
||||||
return cmdLine;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
@ -168,9 +165,6 @@ public class MainActivity extends UnityPlayerActivity
|
|||||||
// Obtain the FirebaseAnalytics instance.
|
// Obtain the FirebaseAnalytics instance.
|
||||||
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
|
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
|
||||||
|
|
||||||
String cmdLine = updateUnityCommandLineArguments(getIntent().getStringExtra("unity"));
|
|
||||||
getIntent().putExtra("unity", cmdLine);
|
|
||||||
|
|
||||||
onLoadNativeLibraries();
|
onLoadNativeLibraries();
|
||||||
app = this;
|
app = this;
|
||||||
Cocos2dxHelper.init(this);
|
Cocos2dxHelper.init(this);
|
||||||
|
@ -22,10 +22,10 @@ android.enableJetifier=true
|
|||||||
PROP_COMPILE_SDK_VERSION=30
|
PROP_COMPILE_SDK_VERSION=30
|
||||||
|
|
||||||
# Android SDK version that will be used as the earliest version of android this application can run on
|
# Android SDK version that will be used as the earliest version of android this application can run on
|
||||||
PROP_MIN_SDK_VERSION=22
|
PROP_MIN_SDK_VERSION=26
|
||||||
|
|
||||||
# Android SDK version that will be used as the latest version of android this application has been tested on
|
# Android SDK version that will be used as the latest version of android this application has been tested on
|
||||||
PROP_TARGET_SDK_VERSION=31
|
PROP_TARGET_SDK_VERSION=30
|
||||||
|
|
||||||
# Android Build Tools version that will be used as the compile project
|
# Android Build Tools version that will be used as the compile project
|
||||||
PROP_BUILD_TOOLS_VERSION=30.0.2
|
PROP_BUILD_TOOLS_VERSION=30.0.2
|
||||||
|
1
install-time-asset_pack/.gitignore
vendored
1
install-time-asset_pack/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
/build
|
|
@ -1,44 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'com.android.asset-pack'
|
|
||||||
|
|
||||||
assetPack{
|
|
||||||
packName = "install_time_asset_pack"
|
|
||||||
dynamicDelivery{
|
|
||||||
deliveryType = "install-time" //PAD资源分发 安装时分发
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 21
|
|
||||||
targetSdkVersion 32
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
|
||||||
implementation 'com.google.android.material:material:1.4.0'
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
|
||||||
}
|
|
21
install-time-asset_pack/proguard-rules.pro
vendored
21
install-time-asset_pack/proguard-rules.pro
vendored
@ -1,21 +0,0 @@
|
|||||||
# Add project specific ProGuard rules here.
|
|
||||||
# You can control the set of applied configuration files using the
|
|
||||||
# proguardFiles setting in build.gradle.
|
|
||||||
#
|
|
||||||
# For more details, see
|
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
||||||
|
|
||||||
# If your project uses WebView with JS, uncomment the following
|
|
||||||
# and specify the fully qualified class name to the JavaScript interface
|
|
||||||
# class:
|
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
||||||
# public *;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Uncomment this to preserve the line number information for
|
|
||||||
# debugging stack traces.
|
|
||||||
#-keepattributes SourceFile,LineNumberTable
|
|
||||||
|
|
||||||
# If you keep the line number information, uncomment this to
|
|
||||||
# hide the original source file name.
|
|
||||||
#-renamesourcefileattribute SourceFile
|
|
@ -1,26 +0,0 @@
|
|||||||
package com.example.mylibrary;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
import androidx.test.platform.app.InstrumentationRegistry;
|
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instrumented test, which will execute on an Android device.
|
|
||||||
*
|
|
||||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
|
||||||
*/
|
|
||||||
@RunWith(AndroidJUnit4.class)
|
|
||||||
public class ExampleInstrumentedTest {
|
|
||||||
@Test
|
|
||||||
public void useAppContext() {
|
|
||||||
// Context of the app under test.
|
|
||||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
|
||||||
assertEquals("com.example.mylibrary.test", appContext.getPackageName());
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
package="com.example.mylibrary">
|
|
||||||
|
|
||||||
</manifest>
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.example.mylibrary;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Example local unit test, which will execute on the development machine (host).
|
|
||||||
*
|
|
||||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
|
||||||
*/
|
|
||||||
public class ExampleUnitTest {
|
|
||||||
@Test
|
|
||||||
public void addition_isCorrect() {
|
|
||||||
assertEquals(4, 2 + 2);
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,7 +3,9 @@ include ':app'
|
|||||||
rootProject.name = "HeadlessCocos"
|
rootProject.name = "HeadlessCocos"
|
||||||
include ':libcocos2dx'
|
include ':libcocos2dx'
|
||||||
project(':libcocos2dx').projectDir = new File(ext.cfgs.cocos2dxBasePath + '/cocos/platform/android/libcocos2dx')
|
project(':libcocos2dx').projectDir = new File(ext.cfgs.cocos2dxBasePath + '/cocos/platform/android/libcocos2dx')
|
||||||
include ':install-time-asset_pack'
|
|
||||||
|
include ':UnityDataAssetPack'
|
||||||
|
project(':UnityDataAssetPack').projectDir = new File(ext.cfgs.unityAndroidProject + '/UnityDataAssetPack')
|
||||||
|
|
||||||
include ':unityLibrary'
|
include ':unityLibrary'
|
||||||
project(':unityLibrary').projectDir = new File(ext.cfgs.unityAndroidProject + '/unityLibrary')
|
project(':unityLibrary').projectDir = new File(ext.cfgs.unityAndroidProject + '/unityLibrary')
|
Loading…
x
Reference in New Issue
Block a user