diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml
index 972c55143..00891ec8a 100644
--- a/resources/META-INF/plugin.xml
+++ b/resources/META-INF/plugin.xml
@@ -1,5 +1,3 @@
-
-
io.flutter
@@ -21,9 +19,9 @@
Google
Custom Languages
- SNAPSHOT
+ $VERSION
-
+
com.intellij.modules.platform
com.intellij.modules.lang
@@ -49,7 +47,6 @@
com.intellij.modules.androidstudio
-
diff --git a/resources/META-INF/plugin_template.xml b/resources/META-INF/plugin_template.xml
deleted file mode 100644
index 6d95a4914..000000000
--- a/resources/META-INF/plugin_template.xml
+++ /dev/null
@@ -1,381 +0,0 @@
-
-
- io.flutter
- Flutter
-
- Support for developing Flutter applications. Flutter gives developers an easy and productive
- way to build and deploy cross-platform, high-performance mobile apps for both Android and iOS.
- Installing this plugin will also install the Dart plugin.
-
- For some tools, this plugin uses Chromium through JxBrowser to display content from the web.
- JxBrowser complies with LGPL and offers an option to replace Chromium with another component.
- To do this:
- Find the JxBrowser files stored in the plugins directory , under /flutter-intellij/jxbrowser.
- The LGPL requirements are at from JxBrowser , here you can also download the build script to relink with modified components.
- ]]>
-
-
- Google
-
- Custom Languages
- @VERSION@
-
-
-
- com.intellij.modules.platform
- com.intellij.modules.lang
- com.intellij.modules.xdebugger
- org.jetbrains.plugins.yaml
- Dart
- Git4Idea
-
-
-
-
-
- com.intellij.modules.java
- com.intellij.modules.coverage
-
-
- com.google.tools.ij.aiplugin
-
-
- org.jetbrains.android
-
-
-
- @DEPEND@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/resources/META-INF/studio-contribs.xml b/resources/META-INF/studio-contribs.xml
index d331491f1..09ca99832 100644
--- a/resources/META-INF/studio-contribs.xml
+++ b/resources/META-INF/studio-contribs.xml
@@ -1,5 +1,3 @@
-
-
diff --git a/resources/META-INF/studio-contribs_template.xml b/resources/META-INF/studio-contribs_template.xml
deleted file mode 100644
index 09ca99832..000000000
--- a/resources/META-INF/studio-contribs_template.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tool/plugin/lib/plugin.dart b/tool/plugin/lib/plugin.dart
index 2e0a99d13..a0fd5330f 100644
--- a/tool/plugin/lib/plugin.dart
+++ b/tool/plugin/lib/plugin.dart
@@ -78,32 +78,6 @@ List findJavaFiles(String path) {
.toList();
}
-Future genPluginFiles(BuildSpec spec, String destDir) async {
- await genPluginXml(spec, destDir, 'META-INF/plugin.xml');
- await genPluginXml(spec, destDir, 'META-INF/studio-contribs.xml');
- return true;
-}
-
-Future genPluginXml(BuildSpec spec, String destDir, String path) async {
- var templatePath =
- '${path.substring(0, path.length - '.xml'.length)}_template.xml';
- var file = await File(
- p.join(rootPath, destDir, path),
- ).create(recursive: true);
- log('writing ${p.relative(file.path)}');
- var dest = file.openWrite();
- dest.writeln(
- "",
- );
- dest.writeln();
- await utf8.decoder
- .bind(File(p.join(rootPath, 'resources', templatePath)).openRead())
- .transform(LineSplitter())
- .forEach((l) => dest.writeln(substituteTemplateVariables(l, spec)));
- await dest.close();
- await dest.done;
-}
-
bool genPresubmitYaml(List specs) {
// This assumes the file contains 'steps:', which seems reasonable.
var file = File(p.join(rootPath, '.github', 'workflows', 'presubmit.yaml'));
@@ -236,43 +210,6 @@ List> readProductMatrix() {
return (map['list'] as List).cast>();
}
-String substituteTemplateVariables(String line, BuildSpec spec) {
- String valueOf(String name) {
- switch (name) {
- case 'SINCE':
- return spec.sinceBuild;
- case 'UNTIL':
- return spec.untilBuild;
- case 'VERSION':
- var releaseNo = buildVersionNumber(spec);
- return '$releaseNo ';
- case 'DEPEND':
- // If found, this is the module that triggers loading the Android Studio
- // support. The public sources and the installable plugin use different ones.
- return spec.isSynthetic
- ? 'com.intellij.modules.androidstudio'
- : 'com.android.tools.apk';
- default:
- throw 'unknown template variable: $name';
- }
- }
-
- var start = line.indexOf('@');
- while (start >= 0 && start < line.length) {
- var end = line.indexOf('@', start + 1);
- if (end > 0) {
- var name = line.substring(start + 1, end);
- line = line.replaceRange(start, end + 1, valueOf(name));
- if (end < line.length - 1) {
- start = line.indexOf('@', end + 1);
- }
- } else {
- break; // Some commit message has a '@' in it.
- }
- }
- return line;
-}
-
void _copyFile(File file, Directory to, {String filename = ''}) {
if (!file.existsSync()) {
throw "${file.path} does not exist";
@@ -430,7 +367,6 @@ class GradleBuildCommand extends ProductCommand {
var pluginSrc = pluginFile.readAsStringSync();
var studioSrc = studioFile.readAsStringSync();
try {
- await genPluginFiles(spec, 'resources');
return await runner.buildPlugin(spec, buildVersionNumber(spec));
} finally {
pluginFile.writeAsStringSync(pluginSrc);
@@ -573,9 +509,6 @@ class GenerateCommand extends ProductCommand {
@override
Future doit() async {
- var json = readProductMatrix();
- var spec = SyntheticBuildSpec.fromJson(json.first, release, specs);
- await genPluginFiles(spec, 'resources');
if (!genPresubmitYaml(specs)) {
return 1;
}
diff --git a/tool/plugin/test/plugin_test.dart b/tool/plugin/test/plugin_test.dart
index eeddbabe1..0afa6b17f 100644
--- a/tool/plugin/test/plugin_test.dart
+++ b/tool/plugin/test/plugin_test.dart
@@ -6,7 +6,6 @@ import 'dart:io';
import 'package:plugin_tool/plugin.dart';
import 'package:plugin_tool/runner.dart';
-import 'package:plugin_tool/util.dart';
import 'package:plugin_tool/verify.dart';
import 'package:string_validator/string_validator.dart' as validator;
import 'package:test/test.dart';
@@ -176,23 +175,6 @@ void main() {
});
group('build', () {
- test('plugin.xml', () async {
- var runner = makeTestRunner();
- late TestMakeCommand cmd;
- await runner.run(["-d../..", "make"]).whenComplete(() {
- cmd = (runner.commands['make'] as TestMakeCommand);
- });
- var spec = cmd.specs[0];
- await removeAll('../../build/classes');
- await genPluginFiles(spec, 'build/classes');
- var file = File("../../build/classes/META-INF/plugin.xml");
- expect(file.existsSync(), isTrue);
- var content = file.readAsStringSync();
- expect(content.length, greaterThan(10000));
- var loc = content.indexOf('@');
- expect(loc, -1);
- });
-
test('only-version', () async {
ProductCommand command =
makeTestRunner().commands['make'] as ProductCommand;