@@ -117,13 +117,15 @@ private static boolean tryAddMavenDependency(Module module) {
117
117
try {
118
118
IDEAPomFileHelper pomFileHelper = new IDEAPomFileHelper ();
119
119
String pomFilePath = IDEAPomFileHelper .findNearestModulePomFile (module );
120
- if (pomFilePath == null ) {
120
+ if (pomFilePath == null ) {
121
121
Notifications .Bus .notify (notification );
122
122
return false ;
123
123
}
124
124
File pomLibFile = new File (pomFilePath );
125
- showDto = pomFileHelper .addMavenDependency (module ,pomLibFile , DepConfig .servicestackGroupId , DepConfig .clientPackageId , DepConfig .servicestackVersion ) ||
126
- pomFileHelper .addMavenDependency (module ,pomLibFile , DepConfig .gsonGroupId , DepConfig .gsonPackageId , DepConfig .gsonVersion );
125
+ showDto = pomFileHelper .addMavenDependency (module ,pomLibFile , DepConfig .servicestackGroupId , DepConfig .clientPackageId , DepConfig .servicestackVersion );
126
+ if (pomFileHelper .addMavenDependency (module ,pomLibFile , DepConfig .gsonGroupId , DepConfig .gsonPackageId , DepConfig .gsonVersion ))
127
+ showDto = true ;
128
+
127
129
IDEAUtils .refreshFile (module ,pomFilePath ,showDto );
128
130
} catch (Exception e ) {
129
131
showDto = false ;
@@ -139,8 +141,11 @@ private static boolean tryAddMavenDependency(Module module) {
139
141
}
140
142
141
143
private static boolean addGradleDependencyIfRequired (Module module ) throws FileNotFoundException {
142
- if (GradleBuildFileHelper .addDependency (module , DepConfig .servicestackGroupId , DepConfig .androidPackageId , DepConfig .servicestackVersion ) ||
143
- GradleBuildFileHelper .addDependency (module , DepConfig .gsonGroupId , DepConfig .gsonPackageId , DepConfig .gsonVersion )) {
144
+ boolean depAdded = GradleBuildFileHelper .addDependency (module , DepConfig .servicestackGroupId , DepConfig .androidPackageId , DepConfig .servicestackVersion );
145
+ if (GradleBuildFileHelper .addDependency (module , DepConfig .gsonGroupId , DepConfig .gsonPackageId , DepConfig .gsonVersion ))
146
+ depAdded = true ;
147
+
148
+ if (depAdded ) {
144
149
IDEAUtils .refreshBuildFile (module );
145
150
return true ;
146
151
}
0 commit comments