@@ -160,10 +160,14 @@ private static void installHelloWorldPlugin() {
160
160
}
161
161
162
162
public static void checkThatGroovyIsOnClasspath () {
163
- if ( isGroovyOnClasspath ()) return ;
163
+ final File oldGroovyLibrary = new File ( LIVEPLUGIN_LIBS_PATH + File . separator + "groovy-all-2.0.6.jar" ) ;
164
164
165
165
NotificationListener listener = new NotificationListener () {
166
166
@ Override public void hyperlinkUpdate (@ NotNull Notification notification , @ NotNull HyperlinkEvent event ) {
167
+ if (oldGroovyLibrary .exists ()) {
168
+ FileUtil .delete (oldGroovyLibrary );
169
+ }
170
+
167
171
boolean downloaded = downloadFile ("http://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.2.1/" , "groovy-all-2.2.1.jar" , LIVEPLUGIN_LIBS_PATH );
168
172
if (downloaded ) {
169
173
notification .expire ();
@@ -174,6 +178,18 @@ public static void checkThatGroovyIsOnClasspath() {
174
178
}
175
179
}
176
180
};
181
+
182
+ if (oldGroovyLibrary .exists ()) {
183
+ livePluginNotificationGroup .createNotification (
184
+ "There is old version of groovy library on LivePlugin classpath" ,
185
+ "It might work incorrectly. <a href=\" \" >Click here to update groovy to 2.2.1</a> (~6Mb)" ,
186
+ NotificationType .ERROR ,
187
+ listener
188
+ ).notify (null );
189
+ }
190
+
191
+ if (isGroovyOnClasspath ()) return ;
192
+
177
193
livePluginNotificationGroup .createNotification (
178
194
"LivePlugin didn't find Groovy libraries on classpath" ,
179
195
"Without it plugins won't work. <a href=\" \" >Download Groovy libraries</a> (~6Mb)" ,
0 commit comments