diff --git a/freeline-studio-plugin/build.gradle b/freeline-studio-plugin/build.gradle index 194a477..298c2b8 100644 --- a/freeline-studio-plugin/build.gradle +++ b/freeline-studio-plugin/build.gradle @@ -2,19 +2,24 @@ plugins { id "org.jetbrains.intellij" version "0.2.4" } +repositories { + google() +} + apply plugin: 'org.jetbrains.intellij' apply plugin: 'java' compileJava { - sourceCompatibility = 1.6 - targetCompatibility = 1.6 + sourceCompatibility = 1.8 + targetCompatibility = 1.8 } intellij { - version 'IC-2016.2.5' + version 'IC-173.4301.25' pluginName 'Freeline Plugin' plugins = ['android', 'gradle', 'Groovy', 'terminal'] + sameSinceUntilBuild = true // Uncomment to test against Android Studio // intellij.alternativeIdePath = '/Applications/Android Studio.app' -} \ No newline at end of file +} diff --git a/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/actions/UpdateAction.java b/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/actions/UpdateAction.java index cd2decf..a04785b 100644 --- a/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/actions/UpdateAction.java +++ b/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/actions/UpdateAction.java @@ -1,7 +1,7 @@ package com.antfortune.freeline.idea.actions; -import com.android.tools.idea.gradle.dsl.model.GradleBuildModel; -import com.android.tools.idea.gradle.dsl.model.dependencies.ArtifactDependencyModel; +import com.android.tools.idea.gradle.dsl.api.GradleBuildModel; +import com.android.tools.idea.gradle.dsl.api.dependencies.ArtifactDependencyModel; import com.antfortune.freeline.idea.icons.PluginIcons; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.command.CommandProcessor; diff --git a/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/icons/PluginIcons.java b/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/icons/PluginIcons.java index ca6010e..3ef501c 100644 --- a/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/icons/PluginIcons.java +++ b/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/icons/PluginIcons.java @@ -1,8 +1,8 @@ package com.antfortune.freeline.idea.icons; +import com.android.tools.idea.ui.Icons; import com.intellij.icons.AllIcons; import com.intellij.openapi.util.IconLoader; -import icons.AndroidIcons; import javax.swing.*; @@ -35,7 +35,7 @@ private static Icon load(String path) { } private static Icon androidLoad(String path) { - return IconLoader.getIcon(path, AndroidIcons.class); + return IconLoader.getIcon(path, Icons.class); } private static Icon intellijLoad(String path) { diff --git a/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/models/ArtifactDependencyModelWrapper.java b/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/models/ArtifactDependencyModelWrapper.java index d09b495..def2ac7 100644 --- a/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/models/ArtifactDependencyModelWrapper.java +++ b/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/models/ArtifactDependencyModelWrapper.java @@ -1,6 +1,7 @@ package com.antfortune.freeline.idea.models; -import com.android.tools.idea.gradle.dsl.model.dependencies.ArtifactDependencyModel; +import com.android.tools.idea.gradle.dsl.api.dependencies.ArtifactDependencyModel; + import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/utils/FreelineUtil.java b/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/utils/FreelineUtil.java index 0d338cb..a94b223 100644 --- a/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/utils/FreelineUtil.java +++ b/freeline-studio-plugin/src/main/java/com/antfortune/freeline/idea/utils/FreelineUtil.java @@ -1,10 +1,10 @@ package com.antfortune.freeline.idea.utils; +import com.android.tools.idea.gradle.dsl.api.GradleBuildModel; +import com.android.tools.idea.gradle.dsl.api.dependencies.ArtifactDependencyModel; +import com.android.tools.idea.gradle.dsl.api.dependencies.ArtifactDependencySpec; import com.antfortune.freeline.idea.actions.UpdateAction; -import com.android.tools.idea.gradle.dsl.model.GradleBuildModel; -import com.android.tools.idea.gradle.dsl.model.dependencies.ArtifactDependencyModel; -import com.android.tools.idea.gradle.dsl.model.dependencies.ArtifactDependencySpec; import com.android.tools.idea.gradle.parser.GradleBuildFile; import com.intellij.execution.ExecutionException; import com.intellij.execution.configurations.GeneralCommandLine; @@ -306,7 +306,7 @@ public void run() { for (ArtifactDependencyModel model1 : artifactDependencyModels) { ArtifactDependencyModelWrapper wrapper = new ArtifactDependencyModelWrapper(model1); if (wrapper.group().equals(Constant.ANDROID_GRADLE_TOOL_GROUP_NAME)) { - ArtifactDependencySpec spec = new ArtifactDependencySpec(dependencyEntity.getArtifactId(), + ArtifactDependencySpec spec = ArtifactDependencySpec.create(dependencyEntity.getArtifactId(), dependencyEntity.getGroupId(), dependencyEntity.getNewestReleaseVersion()); model.buildscript().dependencies().addArtifact("classpath", spec); model.applyChanges(); diff --git a/freeline-studio-plugin/src/main/resources/META-INF/plugin.xml b/freeline-studio-plugin/src/main/resources/META-INF/plugin.xml index d351854..d3face7 100644 --- a/freeline-studio-plugin/src/main/resources/META-INF/plugin.xml +++ b/freeline-studio-plugin/src/main/resources/META-INF/plugin.xml @@ -1,7 +1,7 @@ com.apkfuns.plugin.freeline Freeline Plugin - 1.1.4 + 1.1.5 act262, 舞影凌风 +
  • + 1.1.5
    + support Android studio 3.1.x +
  • 1.1.4
    Add feedback channel -
  • -
  • +
  • 1.1.3
    fix V2.3 beta2-3 crash @@ -51,7 +54,7 @@ - + @@ -128,4 +131,4 @@ - \ No newline at end of file + diff --git a/settings.gradle b/settings.gradle index cafeb5a..8142729 100644 --- a/settings.gradle +++ b/settings.gradle @@ -20,4 +20,4 @@ include ':gradle' project(':gradle').projectDir = new File('freeline-gradle-plugin') // freeline studio plugin -//include ':freeline-studio-plugin' \ No newline at end of file +include ':freeline-studio-plugin' \ No newline at end of file