edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bjhargrave <...@git.apache.org>
Subject [GitHub] incubator-quarks pull request #131: [QUARKS-139] Alternative gradle build
Date Wed, 08 Jun 2016 20:38:13 GMT
Github user bjhargrave commented on a diff in the pull request:

    https://github.com/apache/incubator-quarks/pull/131#discussion_r66334945
  
    --- Diff: build.gradle ---
    @@ -0,0 +1,96 @@
    +/* Configure root project */
    +ext.commithash = {
    +  try {
    +    return "git rev-parse --short HEAD".execute().text.trim()
    +  } catch (Exception e) {
    +    return ''
    +  }
    +}()
    +def now = new Date()
    +ext.DSTAMP = String.format('%tY%<tm%<td', now)
    +ext.TSTAMP = String.format('%tH%<tM', now)
    +ext.ext_classpath = ['com.google.code.gson:gson:2.2.4', 
    +  'org.slf4j:slf4j-api:1.7.12', 
    +  'io.dropwizard.metrics:metrics-core:3.1.2']
    +
    +/* Configure subprojects */
    +subprojects {
    +  repositories {
    +    mavenCentral()
    +    maven {
    +      url 'https://repo.eclipse.org/content/repositories/paho-snapshots/'
    +    }
    +  }
    +
    +  plugins.apply 'java'
    +  plugins.apply 'jacoco'
    +
    +  archivesBaseName = "${rootProject.name}${project.path.replace(':','.')}"
    +  version = quarks_version
    +
    +  jacoco {
    +    toolVersion = '0.7.5.201505241946'
    +  }
    +
    +  dependencies {
    +    testCompile 'junit:junit:4.10'
    +    testRuntime 'org.slf4j:slf4j-jdk14:1.7.12'
    +  }
    +
    +  ext.addCompileTestDependencies = { String... deps ->
    +    deps.each { dep ->
    +      dependencies {
    +        testCompile project(dep).sourceSets.test.output
    +      }
    +      compileTestJava {
    +        dependsOn "${dep}:compileTestJava"
    +      }
    +    }
    +  }
    +
    +  sourceCompatibility = '1.8'
    +  targetCompatibility = '1.8'
    +  def compileOptions = {
    +    options.debugOptions.debugLevel = 'source,lines,vars'
    +    options.verbose = logger.isDebugEnabled()
    +    options.listFiles = logger.isInfoEnabled()
    +    options.deprecation = true
    +    options.encoding = 'UTF-8'
    +  }
    +  compileJava {
    +    configure compileOptions
    +  }
    +  compileTestJava {
    +    configure compileOptions
    +  }
    +
    +  test {
    +    include '**/*Test.class'
    +    systemProperty 'top.dir.file.path', rootProject.projectDir
    +    testLogging {
    +      exceptionFormat 'full'
    +    }
    +  }
    +
    +  ext.jarOptions = {
    +    manifest {
    +      attributes(
    +        'Implementation-Title': "${-> baseName}",
    +        'Implementation-Vendor': 'quarks-edge@github.com',
    --- End diff --
    
    Yeah, I just got that from [master](https://github.com/apache/incubator-quarks/blob/master/common-build.xml#L169).
I'll amend the commit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message