aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMads Ager <ager@google.com>2017-08-23 16:10:25 +0200
committerMads Ager <ager@google.com>2017-08-23 16:10:25 +0200
commitc145055d9441d26a13ea49c8ddaa5ad4ff05b91f (patch)
tree9ad2ebd6fd89b6c7d95ca081c94d11909ff90289
parent9423b413c63ef742f902efa4ca63a0d6d132e526 (diff)
downloadr8-c145055d9441d26a13ea49c8ddaa5ad4ff05b91f.tar.gz
Merge build file fixes to 0.1 release branch.
Patches merged: https://r8-review.googlesource.com/c/r8/+/4761 https://r8-review.googlesource.com/c/r8/+/4840 These ensure that we do not package junit and hamcrest in our release builds. R=herhut@google.com Change-Id: I5bad6aebf9a0fdca524b7bb23d5751f60b2f61cb
-rw-r--r--build.gradle24
-rw-r--r--src/main/java/com/android/tools/r8/D8.java2
-rw-r--r--src/main/java/com/android/tools/r8/R8.java2
-rw-r--r--src/test/java/com/android/tools/r8/internal/R8GMSCoreLookupTest.java6
-rw-r--r--src/test/java/com/android/tools/r8/internal/R8GMSCoreTreeShakeJarVerificationTest.java2
-rw-r--r--src/test/java/com/android/tools/r8/ir/regalloc/IdenticalAfterRegisterAllocationTest.java4
-rw-r--r--src/test/java/com/android/tools/r8/jasmin/InvalidClassNames.java6
-rw-r--r--src/test/java/com/android/tools/r8/jasmin/InvalidFieldNames.java6
-rw-r--r--src/test/java/com/android/tools/r8/jasmin/InvalidMethodNames.java7
-rw-r--r--src/test/java/com/android/tools/r8/shaking/R8Shaking2LookupTest.java2
-rw-r--r--src/test/java/com/android/tools/r8/utils/R8InliningTest.java4
11 files changed, 35 insertions, 30 deletions
diff --git a/build.gradle b/build.gradle
index 4d25a4448..fa1e717f9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -114,7 +114,7 @@ configurations {
dependencies {
compile 'net.sf.jopt-simple:jopt-simple:4.6'
- compile 'com.googlecode.json-simple:json-simple:1.1.1'
+ compile 'com.googlecode.json-simple:json-simple:1.1'
compile group: 'com.google.guava', name: 'guava', version: '19.0'
compile group: 'it.unimi.dsi', name: 'fastutil', version: '7.2.0'
compile group: 'org.apache.commons', name: 'commons-compress', version: '1.12'
@@ -326,12 +326,15 @@ task R8(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
// In order to build without dependencies, pass the exclude_deps property using:
// gradle -Pexclude_deps R8
if (!project.hasProperty('exclude_deps')) {
- // Relocating dependencies to avoid conflicts.
- relocate 'com.google', 'com.android.tools.r8.com.google'
+ // Relocating dependencies to avoid conflicts. Keep this as precise as possible
+ // to avoid rewriting unrelated strings.
+ relocate 'com.google.common', 'com.android.tools.r8.com.google.common'
+ relocate 'com.google.thirdparty', 'com.android.tools.r8.com.google.thirdparty'
relocate 'joptsimple', 'com.android.tools.r8.joptsimple'
- relocate 'org', 'com.android.tools.r8.org'
+ relocate 'org.apache.commons', 'com.android.tools.r8.org.apache.commons'
+ relocate 'org.objectweb.asm', 'com.android.tools.r8.org.objectweb.asm'
+ relocate 'org.json.simple', 'com.android.tools.r8.org.json.simple'
relocate 'it.unimi.dsi.fastutil', 'com.android.tools.r8.it.unimi.dsi.fastutil'
- relocate 'junit', 'com.android.tools.r8.junit'
// Also include dependencies
configurations = [project.configurations.compile]
}
@@ -348,12 +351,15 @@ task D8(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
// In order to build without dependencies, pass the exclude_deps property using:
// gradle -Pexclude_deps D8
if (!project.hasProperty('exclude_deps')) {
- // Relocating dependencies to avoid conflicts.
- relocate 'com.google', 'com.android.tools.r8.com.google'
+ // Relocating dependencies to avoid conflicts. Keep this as precise as possible
+ // to avoid rewriting unrelated strings.
+ relocate 'com.google.common', 'com.android.tools.r8.com.google.common'
+ relocate 'com.google.thirdparty', 'com.android.tools.r8.com.google.thirdparty'
relocate 'joptsimple', 'com.android.tools.r8.joptsimple'
- relocate 'org', 'com.android.tools.r8.org'
+ relocate 'org.apache.commons', 'com.android.tools.r8.org.apache.commons'
+ relocate 'org.objectweb.asm', 'com.android.tools.r8.org.objectweb.asm'
+ relocate 'org.json.simple', 'com.android.tools.r8.org.json.simple'
relocate 'it.unimi.dsi.fastutil', 'com.android.tools.r8.it.unimi.dsi.fastutil'
- relocate 'junit', 'com.android.tools.r8.junit'
// Also include dependencies
configurations = [project.configurations.compile]
}
diff --git a/src/main/java/com/android/tools/r8/D8.java b/src/main/java/com/android/tools/r8/D8.java
index 534683679..a3d601281 100644
--- a/src/main/java/com/android/tools/r8/D8.java
+++ b/src/main/java/com/android/tools/r8/D8.java
@@ -55,7 +55,7 @@ import java.util.concurrent.ExecutorService;
*/
public final class D8 {
- private static final String VERSION = "v0.1.1";
+ private static final String VERSION = "v0.1.2";
private static final int STATUS_ERROR = 1;
private D8() {}
diff --git a/src/main/java/com/android/tools/r8/R8.java b/src/main/java/com/android/tools/r8/R8.java
index 4dc90c87b..bf82830a7 100644
--- a/src/main/java/com/android/tools/r8/R8.java
+++ b/src/main/java/com/android/tools/r8/R8.java
@@ -71,7 +71,7 @@ import java.util.concurrent.Executors;
public class R8 {
- private static final String VERSION = "v0.1.1";
+ private static final String VERSION = "v0.1.2";
private final Timing timing = new Timing("R8");
private final InternalOptions options;
diff --git a/src/test/java/com/android/tools/r8/internal/R8GMSCoreLookupTest.java b/src/test/java/com/android/tools/r8/internal/R8GMSCoreLookupTest.java
index f88ea4988..74e4e9baf 100644
--- a/src/test/java/com/android/tools/r8/internal/R8GMSCoreLookupTest.java
+++ b/src/test/java/com/android/tools/r8/internal/R8GMSCoreLookupTest.java
@@ -3,9 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.internal;
-import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.assertFalse;
-import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import com.android.tools.r8.dex.ApplicationReader;
import com.android.tools.r8.graph.AppInfoWithSubtyping;
diff --git a/src/test/java/com/android/tools/r8/internal/R8GMSCoreTreeShakeJarVerificationTest.java b/src/test/java/com/android/tools/r8/internal/R8GMSCoreTreeShakeJarVerificationTest.java
index efa812a51..8c72dddad 100644
--- a/src/test/java/com/android/tools/r8/internal/R8GMSCoreTreeShakeJarVerificationTest.java
+++ b/src/test/java/com/android/tools/r8/internal/R8GMSCoreTreeShakeJarVerificationTest.java
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.internal;
-import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertTrue;
import com.android.tools.r8.CompilationException;
import com.android.tools.r8.CompilationMode;
diff --git a/src/test/java/com/android/tools/r8/ir/regalloc/IdenticalAfterRegisterAllocationTest.java b/src/test/java/com/android/tools/r8/ir/regalloc/IdenticalAfterRegisterAllocationTest.java
index 08e90c0df..6eebf6b03 100644
--- a/src/test/java/com/android/tools/r8/ir/regalloc/IdenticalAfterRegisterAllocationTest.java
+++ b/src/test/java/com/android/tools/r8/ir/regalloc/IdenticalAfterRegisterAllocationTest.java
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.ir.regalloc;
-import static junit.framework.TestCase.assertFalse;
-import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import com.android.tools.r8.ir.code.Add;
import com.android.tools.r8.ir.code.ConstNumber;
diff --git a/src/test/java/com/android/tools/r8/jasmin/InvalidClassNames.java b/src/test/java/com/android/tools/r8/jasmin/InvalidClassNames.java
index 671698be3..813ea1baa 100644
--- a/src/test/java/com/android/tools/r8/jasmin/InvalidClassNames.java
+++ b/src/test/java/com/android/tools/r8/jasmin/InvalidClassNames.java
@@ -3,9 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.jasmin;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.fail;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
import com.android.tools.r8.ToolHelper;
import com.android.tools.r8.errors.CompilationError;
diff --git a/src/test/java/com/android/tools/r8/jasmin/InvalidFieldNames.java b/src/test/java/com/android/tools/r8/jasmin/InvalidFieldNames.java
index 87d350cf4..4710e69b0 100644
--- a/src/test/java/com/android/tools/r8/jasmin/InvalidFieldNames.java
+++ b/src/test/java/com/android/tools/r8/jasmin/InvalidFieldNames.java
@@ -3,9 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.jasmin;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.fail;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
import com.android.tools.r8.errors.CompilationError;
import java.util.Arrays;
diff --git a/src/test/java/com/android/tools/r8/jasmin/InvalidMethodNames.java b/src/test/java/com/android/tools/r8/jasmin/InvalidMethodNames.java
index e1ace71d2..cbf40a291 100644
--- a/src/test/java/com/android/tools/r8/jasmin/InvalidMethodNames.java
+++ b/src/test/java/com/android/tools/r8/jasmin/InvalidMethodNames.java
@@ -3,11 +3,10 @@
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.jasmin;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.fail;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
-import com.android.tools.r8.CompilationException;
import com.android.tools.r8.errors.CompilationError;
import com.google.common.collect.ImmutableList;
import java.util.Arrays;
diff --git a/src/test/java/com/android/tools/r8/shaking/R8Shaking2LookupTest.java b/src/test/java/com/android/tools/r8/shaking/R8Shaking2LookupTest.java
index be28b384a..0ab229f33 100644
--- a/src/test/java/com/android/tools/r8/shaking/R8Shaking2LookupTest.java
+++ b/src/test/java/com/android/tools/r8/shaking/R8Shaking2LookupTest.java
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.shaking;
-import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
diff --git a/src/test/java/com/android/tools/r8/utils/R8InliningTest.java b/src/test/java/com/android/tools/r8/utils/R8InliningTest.java
index 7f3c3e1e4..7af5708e6 100644
--- a/src/test/java/com/android/tools/r8/utils/R8InliningTest.java
+++ b/src/test/java/com/android/tools/r8/utils/R8InliningTest.java
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.utils;
-import static junit.framework.TestCase.assertFalse;
-import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import com.android.tools.r8.CompilationException;
import com.android.tools.r8.R8Command;