Skip to content

Commit ed2706d

Browse files
committed
1.修改打包方式
1 parent 5da8709 commit ed2706d

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

codeTools/x-FileUnicodeTransformationTool/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ dependencies {
77
group = 'com.xwintop'
88
version = '0.0.1'
99
description = 'x-FileUnicodeTransformationTool'
10+
11+
//打jar包需要的配置
12+
jar {
13+
from { configurations.compileClasspath.findAll { it.name.contains("juniversalchardet") }.collect { zipTree(it) } }
14+
}

developTools/x-LuytenTool/src/main/java/us/deathmarine/luyten/ConfigSaver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ private LuytenPreferences loadLuytenPreferences(Preferences prefs) throws Except
121121
field.set(newLuytenPrefs, prefs.get(prefId, defaultStr));
122122

123123
} else if (field.getType() == Boolean.class || field.getType() == boolean.class) {
124-
Boolean defaultBool = (Boolean) (defaultVal == null ? new Boolean(false) : defaultVal);
124+
Boolean defaultBool = (Boolean) (defaultVal == null ? Boolean.valueOf(false) : defaultVal);
125125
field.setBoolean(newLuytenPrefs, prefs.getBoolean(prefId, defaultBool));
126126

127127
} else if (field.getType() == Integer.class || field.getType() == int.class) {
128-
Integer defaultInt = (Integer) (defaultVal == null ? new Integer(0) : defaultVal);
128+
Integer defaultInt = (Integer) (defaultVal == null ? Integer.valueOf(0) : defaultVal);
129129
field.setInt(newLuytenPrefs, prefs.getInt(prefId, defaultInt));
130130
}
131131
}
@@ -177,10 +177,10 @@ private void saveLuytenPreferences(Preferences prefs) throws Exception {
177177
prefs.put(prefId, (String) (value == null ? "" : value));
178178

179179
} else if (field.getType() == Boolean.class || field.getType() == boolean.class) {
180-
prefs.putBoolean(prefId, (Boolean) (value == null ? new Boolean(false) : value));
180+
prefs.putBoolean(prefId, (Boolean) (value == null ? Boolean.valueOf(false) : value));
181181

182182
} else if (field.getType() == Integer.class || field.getType() == int.class) {
183-
prefs.putInt(prefId, (Integer) (value == null ? new Integer(0) : value));
183+
prefs.putInt(prefId, (Integer) (value == null ? Integer.valueOf(0) : value));
184184
}
185185
}
186186
}

0 commit comments

Comments
 (0)