aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-12-02 19:51:53 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-12-02 19:51:54 +0000
commitfde8b7e27492ae697ccb844b1bff0784b1c21305 (patch)
tree5b7cefb614c3a60e86b0fab6cf90450325c28e8a
parente3ce02cf56a1859340849da3cb245a35413bb76d (diff)
parent1969a2920741de332dae0cae55dce75d57eda153 (diff)
downloadsdk-fde8b7e27492ae697ccb844b1bff0784b1c21305.zip
sdk-fde8b7e27492ae697ccb844b1bff0784b1c21305.tar.gz
sdk-fde8b7e27492ae697ccb844b1bff0784b1c21305.tar.bz2
Merge "80481: Update Gradle Export from Eclipse to handle 1.0" into studio-1.0-dev
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java10
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/FinalPage.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/ImportInsteadPage.java3
3 files changed, 8 insertions, 7 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java
index e749e71..d3df058 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java
@@ -19,6 +19,8 @@ package com.android.ide.eclipse.adt.internal.wizards.exportgradle;
import static com.android.SdkConstants.GRADLE_LATEST_VERSION;
import static com.android.SdkConstants.GRADLE_PLUGIN_LATEST_VERSION;
import static com.android.SdkConstants.GRADLE_PLUGIN_NAME;
+import static com.android.tools.lint.checks.GradleDetector.APP_PLUGIN_ID;
+import static com.android.tools.lint.checks.GradleDetector.LIB_PLUGIN_ID;
import com.android.SdkConstants;
import com.android.annotations.NonNull;
@@ -79,7 +81,7 @@ public class BuildFileCreator {
"tools/templates/gradle/wrapper"; //$NON-NLS-1$
static final String PLUGIN_CLASSPATH =
"classpath '" + GRADLE_PLUGIN_NAME + GRADLE_PLUGIN_LATEST_VERSION + "'"; //$NON-NLS-1$
- static final String MAVEN_REPOSITORY = "mavenCentral()"; //$NON-NLS-1$
+ static final String MAVEN_REPOSITORY = "jcenter()"; //$NON-NLS-1$
private static final String[] GRADLE_WRAPPER_FILES = new String[] {
"gradlew", //$NON-NLS-1$
@@ -358,9 +360,9 @@ public class BuildFileCreator {
*/
private void appendHeader(boolean isLibrary) {
if (isLibrary) {
- mBuildFile.append("apply plugin: 'android-library'\n"); //$NON-NLS-1$
+ mBuildFile.append("apply plugin: '").append(LIB_PLUGIN_ID).append("'\n"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
- mBuildFile.append("apply plugin: 'android'\n"); //$NON-NLS-1$
+ mBuildFile.append("apply plugin: '").append(APP_PLUGIN_ID).append("'\n"); //$NON-NLS-1$ //$NON-NLS-2$
}
mBuildFile.append("\n"); //$NON-NLS-1$
}
@@ -634,7 +636,7 @@ public class BuildFileCreator {
private static String getGradleDistributionUrl(@NonNull String gradleVersion,
boolean binOnly) {
String suffix = binOnly ? "bin" : "all";
- return String.format("http://services.gradle.org/distributions/gradle-%1$s-" + suffix
+ return String.format("https://services.gradle.org/distributions/gradle-%1$s-" + suffix
+ ".zip", gradleVersion);
}
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/FinalPage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/FinalPage.java
index 9e976aa..bbfadf8 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/FinalPage.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/FinalPage.java
@@ -96,7 +96,7 @@ public class FinalPage extends WizardPage {
sb.append("Exported project: ").append(mBuilder.getCommonRoot().toOSString());
}
- sb.append("\n\n").append("Choose 'import project' in Android Studio").append('\n');
+ sb.append("\n\n").append("Choose 'Import Non-Android Studio project' in Android Studio").append('\n');
sb.append("and select the following file:").append("\n\t");
File bGradle = new File(
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/ImportInsteadPage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/ImportInsteadPage.java
index 73d4937..cff9aca 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/ImportInsteadPage.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/ImportInsteadPage.java
@@ -46,8 +46,7 @@ class ImportInsteadPage extends WizardPage {
" to the new Gradle directory layout which better supports multiple resource directories.\n" +
"- It can merge instrumentation test projects into the same project\n" +
"- Android Studio is released more frequently than the ADT plugin, so the import\n" +
- " mechanism more closely tracks the rapidly evolving requirements of Studio Gradle\n" +
- " projects.\n" +
+ " mechanism more closely tracks the requirements of Studio Gradle projects.\n" +
"\n" +
"If you want to preserve your Eclipse directory structure, or if for some reason import\n" +
"in Studio doesn't work (please let us know by filing a bug), continue to export from\n" +