Reviewers: Lex,
Message:
Please review.
Description:
Also:
- Link.legacyLink once again deletes the module output directory, fixing
r6497.
- Intermediate linking individual permutations into a jar now preserves
the timestamp.
Please review this at http://gwt-code-reviews.appspot.com/288801/show
Affected files:
M dev/core/src/com/google/gwt/core/ext/linker/BinaryEmittedArtifact.java
M
dev/core/src/com/google/gwt/core/ext/linker/impl/BinaryOnlyArtifactWrapper.java
M
dev/core/src/com/google/gwt/core/ext/linker/impl/JarEntryEmittedArtifact.java
M dev/core/src/com/google/gwt/dev/Link.java
Index:
dev/core/src/com/google/gwt/core/ext/linker/BinaryEmittedArtifact.java
diff --git
a/dev/core/src/com/google/gwt/core/ext/linker/BinaryEmittedArtifact.java
b/dev/core/src/com/google/gwt/core/ext/linker/BinaryEmittedArtifact.java
index
1828b1fc682c3cccb59171e450a5bb4a4764261f..54679fba20e5d0119bb17a156e0be4115abf8306
100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/BinaryEmittedArtifact.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/BinaryEmittedArtifact.java
@@ -31,4 +31,10 @@ public abstract class BinaryEmittedArtifact extends
EmittedArtifact {
protected BinaryEmittedArtifact(String partialPath) {
super(StandardLinkerContext.class, partialPath);
}
+
+ /**
+ * Force subclasses to define.
+ */
+ @Override
+ public abstract long getLastModified();
}
Index:
dev/core/src/com/google/gwt/core/ext/linker/impl/BinaryOnlyArtifactWrapper.java
diff --git
a/dev/core/src/com/google/gwt/core/ext/linker/impl/BinaryOnlyArtifactWrapper.java
b/dev/core/src/com/google/gwt/core/ext/linker/impl/BinaryOnlyArtifactWrapper.java
index
3cf6fca6a50f208abc35dc4d963bf9d1d510b3a4..b3c868b778f791f94c1b5b6446d1df93ed478c32
100644
---
a/dev/core/src/com/google/gwt/core/ext/linker/impl/BinaryOnlyArtifactWrapper.java
+++
b/dev/core/src/com/google/gwt/core/ext/linker/impl/BinaryOnlyArtifactWrapper.java
@@ -40,4 +40,9 @@ public class BinaryOnlyArtifactWrapper extends
BinaryEmittedArtifact {
throws UnableToCompleteException {
return underlyingArtifact.getContents(logger);
}
+
+ @Override
+ public long getLastModified() {
+ return underlyingArtifact.getLastModified();
+ }
}
Index:
dev/core/src/com/google/gwt/core/ext/linker/impl/JarEntryEmittedArtifact.java
diff --git
a/dev/core/src/com/google/gwt/core/ext/linker/impl/JarEntryEmittedArtifact.java
b/dev/core/src/com/google/gwt/core/ext/linker/impl/JarEntryEmittedArtifact.java
index
1c1885e2280206f55f703a23ac9dd78b13fa05cb..89678d266ecff3eb60da29c1ca131ad1f0110b12
100644
---
a/dev/core/src/com/google/gwt/core/ext/linker/impl/JarEntryEmittedArtifact.java
+++
b/dev/core/src/com/google/gwt/core/ext/linker/impl/JarEntryEmittedArtifact.java
@@ -83,4 +83,9 @@ public class JarEntryEmittedArtifact extends
BinaryEmittedArtifact {
throw new UnableToCompleteException();
}
}
+
+ @Override
+ public long getLastModified() {
+ return entry.getTime();
+ }
}
Index: dev/core/src/com/google/gwt/dev/Link.java
diff --git a/dev/core/src/com/google/gwt/dev/Link.java
b/dev/core/src/com/google/gwt/dev/Link.java
index
cbaf11358ac863217c801b24dfc62b5e1480a960..eaa6ae4f76a029b609355b741bcfb45e57873ad0
100644
--- a/dev/core/src/com/google/gwt/dev/Link.java
+++ b/dev/core/src/com/google/gwt/dev/Link.java
@@ -154,10 +154,10 @@ public class Link {
module, precompileOptions);
ArtifactSet artifacts = doSimulatedShardingLink(logger, module,
linkerContext, generatedArtifacts, permutations, resultFiles);
- OutputFileSet outFileSet = new OutputFileSetOnDirectory(outDir,
- module.getName() + "/");
- OutputFileSet extraFileSet = new OutputFileSetOnDirectory(outDir,
- module.getName() + "-aux/");
+ OutputFileSet outFileSet = chooseOutputFileSet(outDir, module.getName()
+ + "/");
+ OutputFileSet extraFileSet = chooseOutputFileSet(outDir,
module.getName()
+ + "-aux/");
doProduceOutput(logger, artifacts, linkerContext, outFileSet,
extraFileSet);
}
@@ -216,7 +216,9 @@ public class Link {
} else {
jarEntryPath = "target/" + art.getPartialPath();
}
- jar.putNextEntry(new ZipEntry(jarEntryPath));
+ ZipEntry ze = new ZipEntry(jarEntryPath);
+ ze.setTime(art.getLastModified());
+ jar.putNextEntry(ze);
art.writeTo(logger, jar);
jar.closeEntry();
}
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
To unsubscribe from this group, send email to
google-web-toolkit-contributors+unsubscribegooglegroups.com or reply to this email with
the words "REMOVE ME" as the subject.