# Conflicts:
#	.idea/caches/build_file_checksums.ser
This commit is contained in:
hyb1996
2018-07-18 23:48:44 +08:00
3 changed files with 31 additions and 11 deletions

View File

@@ -8,6 +8,7 @@ import com.google.gson.annotations.SerializedName;
import com.stardust.pio.PFiles;
import com.stardust.pio.UncheckedIOException;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
@@ -80,7 +81,6 @@ public class ProjectConfig {
}
public String getName() {
return mName;
}
@@ -128,11 +128,24 @@ public class ProjectConfig {
public List<String> getAssets() {
if (mAssets == null) {
mAssets = new ArrayList<>();
mAssets = Collections.emptyList();
}
return mAssets;
}
public boolean addAsset(String assetRelativePath) {
if (mAssets == null) {
mAssets = new ArrayList<>();
}
for (String asset : mAssets) {
if (new File(asset).equals(new File(assetRelativePath))) {
return false;
}
}
mAssets.add(assetRelativePath);
return true;
}
public void setAssets(List<String> assets) {
mAssets = assets;
}