All Downloads are FREE. Search and download functionalities are using the official Maven repository.

archetype-resources.build.gradle Maven / Gradle / Ivy

// Copyright 2015 Google Inc. All Rights Reserved.
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//        http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
// [START gradle]
buildscript {    // Configuration for building
  repositories {
    jcenter()    // Bintray's repository - a fast Maven Central mirror & more
    mavenCentral()
  }
  dependencies {
    classpath 'com.google.cloud.tools:appengine-gradle-plugin:+'    // latest App Engine Gradle tasks
    classpath 'org.akhikhl.gretty:gretty:+'
  }
}

repositories {   // repositories for Jar's you access in your code
  maven {
    url 'https://oss.sonatype.org/content/repositories/snapshots' // SNAPSHOT repository (if needed)
  }
  mavenCentral()
  jcenter()
}

apply plugin: 'java'                              // standard Java tasks
apply plugin: 'war'                               // standard Web Archive plugin
apply plugin: 'org.akhikhl.gretty'
apply plugin: 'com.google.cloud.tools.appengine'  // App Engine tasks

dependencies {
  providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
  providedCompile 'com.google.appengine:appengine-api-1.0-sdk:+'  // Latest App Engine Api's
  compile 'jstl:jstl:1.2'

// Add your dependencies here.
//  compile 'com.google.cloud:google-cloud:+'   // Latest Cloud API's http://googlecloudplatform.github.io/google-cloud-java

  testCompile 'junit:junit:4.12'
  testCompile 'com.google.truth:truth:0.30'
  testCompile 'org.mockito:mockito-all:1.10.19'

  testCompile 'com.google.appengine:appengine-testing:+'
  testCompile 'com.google.appengine:appengine-api-stubs:+'
  testCompile 'com.google.appengine:appengine-tools-sdk:+'
}

// Always run unit tests
appengineDeploy.dependsOn test
appengineStage.dependsOn test

// [START gretty]
gretty {
    port = 8080
    contextPath = '/'
    servletContainer = 'jetty9'  // What App Engine Flexible uses
}
// [END gretty]

// [START model]
appengine {  // App Engine tasks configuration
  deploy {   // deploy configuration

  }
}

test {
  useJUnit()
  testLogging.showStandardStreams = true
  beforeTest { descriptor ->
     logger.lifecycle("test: " + descriptor + "  Running")
  }

  onOutput { descriptor, event ->
     logger.lifecycle("test: " + descriptor + ": " + event.message )
  }
  afterTest { descriptor, result ->
    logger.lifecycle("test: " + descriptor + ": " + result )
  }
}
// [END model]

group   = "${groupId}"        // Generated output GroupId
version = "${version}"        // Version in generated output

sourceCompatibility = 1.8     // App Engine Flexible uses Java 8
targetCompatibility = 1.8     // App Engine Flexible uses Java 8
// [END gradle]




© 2015 - 2025 Weber Informatics LLC | Privacy Policy