Compare commits

..

No commits in common. "master" and "v.1.5.3_android" have entirely different histories.

24 changed files with 158 additions and 568 deletions

View File

@ -13,8 +13,8 @@ namespace BFEditor.Build
public class BuildProjectWindow : EditorWindow
{
private static int versionCode = 18;
private static string versionName = "1.6.5";
private static int versionCode = 17;
private static string versionName = "1.5.3";
BFPlatformOptions platform = BFPlatformOptions.AndroidDev;
const string ANDROID_DEV_PACKAGE_NAME = "com.juzu.b6.dev.android";
const string ANDROID_RELEASE_PACKAGE_NAME = "com.juzu.b6.release.android";

View File

@ -620,6 +620,12 @@ namespace BFEditor.Build
var buildGradlePath = Path.Combine(PublishAsProjectPath, "launcher/build.gradle");
var buildGradleText = File.ReadAllText(buildGradlePath);
var regex1 = new Regex("implementation 'com.google.android.play:core:1.10.0'");
if (!regex1.IsMatch(buildGradleText))
{
var regex12 = new Regex("dependencies {");
buildGradleText = regex12.Replace(buildGradleText, "dependencies {\n implementation 'com.google.android.play:core:1.10.0'");
}
var regex2 = new Regex("assetPacks = [\":install_time_pack\"]");
if (!regex2.IsMatch(buildGradleText))
{

View File

@ -136,17 +136,71 @@ namespace BFEditor
var configFileInfos = configDirInfo.GetFiles(suffix, SearchOption.TopDirectoryOnly);
// 检查棋盘文件格式
checkBoard("chapter_board", env, sb);
checkBoard("chapter_board_bossrush", env, sb);
checkBoard("chapter_board_daily_challenge", env, sb);
checkBoard("chapter_board_dungeon_armor", env, sb);
checkBoard("chapter_board_dungeon_equip", env, sb);
checkBoard("chapter_board_dungeon_gold", env, sb);
checkBoard("chapter_board_dungeon_shards", env, sb);
checkBoard("chapter_board_rune", env, sb);
checkBoard("activity_pvp_board", env, sb);
checkBoard("arena_board", env, sb);
var luaScriptString = @"local cfg = require('app/config/chapter_board')
if not cfg or not cfg.data then
return ''
end
cfg = cfg.data
local tempMap = {}
local addErrorInfo = function(errorInfo, cfgId, errorStr)
if not tempMap[cfgId] then
tempMap[cfgId] = true
table.insert(errorInfo, 'cfgId = ' .. cfgId)
end
table.insert(errorInfo, ' ' .. errorStr)
end
local errorInfo = {}
for k, info in pairs(cfg) do
local board = info.board
if not board then
addErrorInfo(errorInfo, k, 'board字段')
end
if #board < 49 then
addErrorInfo(errorInfo, k, 'board长度不足' .. #board)
end
for index, v in ipairs(board) do
if not v[1] then
addErrorInfo(errorInfo, k, 'board字段中' .. index .. '')
end
if not v[2] then
addErrorInfo(errorInfo, k, 'board字段中' .. index .. '')
end
end
local mystery_box_board = info.mystery_box_board
if mystery_box_board then
for index, v in ipairs(mystery_box_board) do
if not v[1] then
addErrorInfo(errorInfo, k, 'mystery_box_board字段中' .. index .. '')
end
if not v[2] then
addErrorInfo(errorInfo, k, 'mystery_box_board字段中' .. index .. '')
end
end
end
end
if #errorInfo > 0 then
return table.concat(errorInfo, '\n');
end
return ''";
var resultStr = env.DoString(luaScriptString);
if (resultStr.Length > 0)
{
foreach(var strObj in resultStr)
{
var str = Convert.ToString(strObj);
if(!String.IsNullOrEmpty(str))
{
sb.Append(str + "\n");
}
}
}
// 检查monster
string monsterConfigListLua = "{";
@ -159,7 +213,7 @@ namespace BFEditor
}
}
monsterConfigListLua += "}";
var luaScriptString = "local ids = {}\n local MONSTER_LIST = " + monsterConfigListLua + "\n";
luaScriptString = "local ids = {}\n local MONSTER_LIST = " + monsterConfigListLua + "\n";
luaScriptString += @"local str = {}
for i, name in ipairs(MONSTER_LIST) do
if name ~= 'monster_base' and name ~= 'monster_position' and name ~= 'monster_position_base' then
@ -176,7 +230,7 @@ namespace BFEditor
return table.concat(str, '\n');
end
return ''";
var resultStr = env.DoString(luaScriptString);
resultStr = env.DoString(luaScriptString);
if (resultStr.Length > 0)
{
foreach(var strObj in resultStr)
@ -245,76 +299,6 @@ namespace BFEditor
return sb;
}
public static void checkBoard(string configName, LuaEnv env, in StringBuilder sb)
{
var luaScriptString = @"
if not cfg or not cfg.data then
return ''
end
cfg = cfg.data
local tempMap = {}
local addErrorInfo = function(errorInfo, cfgId, errorStr)
if not tempMap[cfgId] then
tempMap[cfgId] = true
table.insert(errorInfo, 'cfgId = ' .. cfgId)
end
table.insert(errorInfo, ' ' .. errorStr)
end
local errorInfo = {}
for k, info in pairs(cfg) do
local board = info.board or info.board_daily_challenge
if not board then
addErrorInfo(errorInfo, k, configName .. ' board字段')
else
if #board < 49 then
addErrorInfo(errorInfo, k, configName .. ' board长度不足' .. #board)
end
for index, v in ipairs(board) do
if not v[1] then
addErrorInfo(errorInfo, k, configName .. ' board字段中' .. index .. '')
end
if not v[2] then
addErrorInfo(errorInfo, k, configName .. ' board字段中' .. index .. '')
elseif v[2] > 5 or v[2] < 0 then
addErrorInfo(errorInfo, k, configName .. ' board字段中' .. index .. '' .. v[2])
end
end
local mystery_box_board = info.mystery_box_board
if mystery_box_board then
for index, v in ipairs(mystery_box_board) do
if not v[1] then
addErrorInfo(errorInfo, k, configName .. ' mystery_box_board字段中' .. index .. '')
end
if not v[2] then
addErrorInfo(errorInfo, k, configName .. ' mystery_box_board字段中' .. index .. '')
end
end
end
end
end
if #errorInfo > 0 then
return table.concat(errorInfo, '\n');
end
return ''";
var resultStr = env.DoString(" local cfg = require('app/config/" + configName + "')\n" + "local configName = '" + configName + "'\n" + luaScriptString);
if (resultStr.Length > 0)
{
foreach(var strObj in resultStr)
{
var str = Convert.ToString(strObj);
if(!String.IsNullOrEmpty(str))
{
sb.Append(str + "\n");
}
}
}
}
public static bool FastExportExcelToLua(bool isDeveloper, string designExcelPath)
{
failFlag = false;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.google.gms:google-services:4.3.13'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'
}

View File

@ -1,5 +1,6 @@
org.gradle.jvmargs=-Xmx4096M
org.gradle.parallel=true
android.enableR8=false
android.useAndroidX=true
android.enableJetifier=true
unityStreamingAssets=.unity3d, .bytes, .ab, UnityServicesProjectConfiguration.json

View File

@ -16,10 +16,10 @@ android {
}
}
compileSdkVersion 34
compileSdkVersion 33
buildToolsVersion '30.0.2'
defaultConfig {
targetSdkVersion 34
targetSdkVersion 33
}
lintOptions {

View File

@ -50,7 +50,7 @@ dependencies {
implementation(name: 'UnityUtils-release', ext:'aar')
implementation(name: 'facebook-android-wrapper-15.1.0', ext:'aar')
implementation 'com.google.android.gms:play-services-auth:20.1.0'
implementation "com.android.billingclient:billing:6.2.1"
implementation "com.android.billingclient:billing:5.0.0"
// firebase
implementation 'com.google.firebase:firebase-analytics:21.1.0'
@ -119,17 +119,17 @@ dependencies {
}
android {
compileSdkVersion 34
compileSdkVersion 33
buildToolsVersion '30.0.2'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion 24
targetSdkVersion 34
minSdkVersion 19
targetSdkVersion 33
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
}

View File

@ -10,17 +10,17 @@ dependencies {
}
android {
compileSdkVersion 34
compileSdkVersion 33
buildToolsVersion '30.0.2'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion 24
targetSdkVersion 34
minSdkVersion 19
targetSdkVersion 33
applicationId 'REPLACE_APPLICATION_ID'
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'