Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small bug fix #30

Merged
merged 8 commits into from
Mar 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Logger;

import org.w3c.dom.Attr;
import org.w3c.dom.Document;
Expand Down Expand Up @@ -77,9 +78,11 @@
import com.dragome.commons.compiler.classpath.ClasspathFile;
import com.dragome.commons.compiler.classpath.InMemoryClasspathFile;
import com.dragome.commons.compiler.classpath.serverside.VirtualFolderClasspathEntry;
import com.dragome.compiler.utils.Log;
import com.dragome.web.config.DomHandlerDelegateStrategy;
import com.dragome.web.enhancers.jsdelegate.serverside.JsDelegateGenerator;
import com.dragome.web.helpers.DefaultClasspathFileFilter;
import com.dragome.web.helpers.serverside.DragomeCompilerLauncher;
import com.dragome.web.html.dom.w3c.ArrayBufferFactory;
import com.dragome.web.html.dom.w3c.HTMLCanvasElementExtension;
import com.dragome.web.html.dom.w3c.HTMLImageElementExtension;
Expand All @@ -91,6 +94,8 @@
/** @author xpenatan */
@DragomeConfiguratorImplementor(priority= 10)
public abstract class DragomeGdxConfiguration extends ChainedInstrumentationDragomeConfigurator {
private static Logger LOGGER= Logger.getLogger(DragomeGdxConfiguration.class.getName());

String projName;

protected JsDelegateGenerator jsDelegateGenerator;
Expand Down Expand Up @@ -319,7 +324,7 @@ else if(include == false) {
if(include == false)
include = projectClassPathFilter(classpathEntry);
if(filterClassPathLog())
System.out.println("Allow Project: " + include + " path: " + classpathEntry);
LOGGER.info("Allow Project: " + include + " path: " + classpathEntry);
return include;
}

Expand Down Expand Up @@ -375,20 +380,39 @@ else if (name.contains("dragome-"))
}
});
Iterator<ClasspathEntry> iterator = classPath.getEntries().iterator();
System.out.println("######################## ClassPath Order ########################");
while(iterator.hasNext())
System.out.println(iterator.next());
System.out.println("#################################################################");
final StringBuilder sb = new StringBuilder();
sb.append("######################## ClassPath Order ########################\n");
while(iterator.hasNext()) {
sb.append(iterator.next().toString());
sb.append("\n");
}
sb.append("#################################################################");
LOGGER.info(sb.toString());
}

private static final String DRAGOME_ADDITIONAL_SHRINK_CODE_KEEP_CONF = "/com/badlogic/gdx/backends/dragome/additional-shrink-code-keep.conf";


@Override
public void getAdditionalCodeKeepConfigFile(ArrayList<URL> urls) {
urls.add(DragomeGdxConfiguration.class.getResource("/com/badlogic/gdx/backends/dragome/additional-shrink-code-keep.conf"));
final URL resource = DragomeGdxConfiguration.class.getResource(DRAGOME_ADDITIONAL_SHRINK_CODE_KEEP_CONF);
if (resource != null) {
urls.add(resource);
} else {
LOGGER.warning("Can not find: " + DRAGOME_ADDITIONAL_SHRINK_CODE_KEEP_CONF);
}
}

private static final String DRAGOME_ADDITIONAL_OBFUSCATE_CODE_KEEP = "/com/badlogic/gdx/backends/dragome/additional-obfuscate-code-keep.conf";

@Override
public void getAdditionalObfuscateCodeKeepConfigFile (ArrayList<URL> urls) {
urls.add(DragomeGdxConfiguration.class.getResource("/com/badlogic/gdx/backends/dragome/additional-obfuscate-code-keep.conf"));
final URL resource = DragomeGdxConfiguration.class.getResource(DRAGOME_ADDITIONAL_OBFUSCATE_CODE_KEEP);
if (resource != null) {
urls.add(resource);
} else {
LOGGER.warning("Can not find: " + DRAGOME_ADDITIONAL_OBFUSCATE_CODE_KEEP);
}
}

/**
Expand Down
21 changes: 19 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url 'https://github.com/chshawkn/maven-settings-decoder/raw/mvn-repo/' }
}
dependencies {
classpath 'cn.home1.tools:maven-settings-decoder:1.0.0.OSS'
}
}

ext {
GROUPID = "com.badlogicgames.gdx"
VERSION = "1.0.0-NIGHTLIES"
Expand Down Expand Up @@ -33,7 +46,11 @@ configure(subprojects) {
uploadArchives {
repositories {
mavenDeployer() {
repository(url: "file://D:/Dev/mvn-repo/snapshots/")
ext.mavenSettings = new cn.home1.tools.maven.SettingsDecoder(null, null, false); // true for debug SettingsDecoder
ext.mavenLocalRepositoryPath = "file://" + ext.mavenSettings.getText("//localRepository")
logger.info("Use local maven repository: " + mavenLocalRepositoryPath);

repository(url: mavenLocalRepositoryPath)
uniqueVersion = false

pom*.whenConfigured { pom -> pom.dependencies.clear() }
Expand Down Expand Up @@ -94,7 +111,7 @@ project(":backends:gdx-backend-dragome") {
}
else
{
println it
logger.info("it")
zipTree(it)
}
}
Expand Down