|
6 | 6 | import java.util.ArrayList; |
7 | 7 | import java.util.List; |
8 | 8 | import java.util.Map; |
9 | | -import java.util.stream.Collectors; |
10 | 9 |
|
11 | 10 | import org.gradle.api.internal.file.FileResolver; |
| 11 | +import org.gradle.api.logging.Logger; |
12 | 12 |
|
13 | 13 | import com.inet.gradle.appbundler.utils.xmlwise.Plist; |
14 | 14 | import com.inet.gradle.appbundler.utils.xmlwise.XmlParseException; |
@@ -167,30 +167,31 @@ private String requestNotarization( File notarizeFile ) { |
167 | 167 | ByteArrayOutputStream error = new ByteArrayOutputStream(); |
168 | 168 | String output = exec( true, error, command.toArray( new String[command.size()] ) ); |
169 | 169 | if( isDebugOutput() ) { |
170 | | - task.getProject().getLogger().debug( output ); |
| 170 | + task.getProject().getLogger().lifecycle( output ); |
171 | 171 | } |
172 | 172 |
|
173 | 173 | try { |
174 | 174 | Map<String, Object> plist = Plist.fromXml( output ); |
175 | 175 | return (String)plist.get( "id" ); |
176 | 176 | } catch( ClassCastException | XmlParseException e ) { |
177 | | - task.getProject().getLogger().error( "An error occured while checking the noraization response." ); |
| 177 | + Logger logger = task.getProject().getLogger(); |
| 178 | + logger.error( "An error occured while checking the noraization response." ); |
178 | 179 | if( !isDebugOutput() ) { |
179 | 180 | // Debug in addition |
180 | | - task.getProject().getLogger().error( "Debug output START:" ); |
181 | | - task.getProject().getLogger().error( output ); |
182 | | - task.getProject().getLogger().error( "Debug output END" ); |
| 181 | + logger.error( "Debug output START:" ); |
| 182 | + logger.error( output ); |
| 183 | + logger.error( "Debug output END" ); |
183 | 184 | } |
184 | 185 |
|
185 | | - task.getProject().getLogger().debug( "The Error stream produced:" ); |
186 | | - task.getProject().getLogger().debug( error.toString() ); |
| 186 | + logger.error( "The Error stream produced:" ); |
| 187 | + logger.error( error.toString() ); |
187 | 188 |
|
188 | 189 | ByteArrayOutputStream bos = new ByteArrayOutputStream(); |
189 | 190 | PrintStream stream = new PrintStream( bos ); |
190 | 191 | e.printStackTrace( stream ); |
191 | | - task.getProject().getLogger().debug( "This is the exception it produced:" ); |
192 | | - task.getProject().getLogger().debug( bos.toString() ); |
193 | | - task.getProject().getLogger().debug( "End of Output." ); |
| 192 | + logger.error( "This is the exception it produced:" ); |
| 193 | + logger.error( bos.toString() ); |
| 194 | + logger.error( "End of Output." ); |
194 | 195 | } |
195 | 196 |
|
196 | 197 | return null; |
|
0 commit comments