Skip to content

Commit

Permalink
Bootstrap app details - #44
Browse files Browse the repository at this point in the history
  • Loading branch information
bhurling committed Jul 11, 2015
1 parent 0606fb1 commit 4525e9a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/groovy/de/triplet/gradle/play/BootstrapTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class BootstrapTask extends PlayPublishTask {

bootstrapListing()
bootstrapWhatsNew()
bootstrapAppDetails()
}

def bootstrapListing() {
Expand Down Expand Up @@ -111,6 +112,15 @@ class BootstrapTask extends PlayPublishTask {
}
}

def bootstrapAppDetails() {
def appDetails = edits.details().get(variant.applicationId, editId).execute()

FileUtils.writeStringToFile(new File(outputFolder, PlayPublishListingTask.FILE_NAME_FOR_CONTACT_EMAIL), appDetails.getContactEmail())
FileUtils.writeStringToFile(new File(outputFolder, PlayPublishListingTask.FILE_NAME_FOR_CONTACT_PHONE), appDetails.getContactPhone())
FileUtils.writeStringToFile(new File(outputFolder, PlayPublishListingTask.FILE_NAME_FOR_CONTACT_WEBSITE), appDetails.getContactWebsite())
FileUtils.writeStringToFile(new File(outputFolder, PlayPublishListingTask.FILE_NAME_FOR_DEFAULT_LANGUAGE), appDetails.getDefaultLanguage())
}

static def saveImage(File listingDir, String imageFolderName, List<Image> images) {
File imageFolder = new File(listingDir, imageFolderName)
if (!imageFolder.exists() && !imageFolder.mkdirs()) {
Expand Down

0 comments on commit 4525e9a

Please sign in to comment.