-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
111 lines (90 loc) · 3.09 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
* Copyright (c) 2015
* Ministério do Planejamento, Orçamento e Gestão
* República Federativa do Brasil
*
* Este programa é um software livre; você pode redistribuí-lo
* e/ou modificá-lo sob os termos da Licença de Software SIOP; O
* texto da licença pode ser consultado no arquivo anexo a esta
* distribuição ou em <http://www.siop.gov.br/licença>.
*/
apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply from: 'gradle/idea.gradle'
apply from: 'gradle/asciidoclet.gradle'
group = 'br.gov.siop.gradle'
archivesBaseName = 'thrift-gradle-plugin'
version = '0.1.0'
description = 'A gradle plugin for compiling Thrift IDL files using the scrooge or thrift compilers'
ext {
title = 'Thrift Gradle Plugin'
organizationId = 'br.gov.siop'
organizationName = 'SIOP'
organizationUrl = 'http://oss.siop.gov.br/'
licenseName = 'Licença de Software SIOP'
licenseUrl = 'http://www.siop.gov.br/licença'
createdBy = "${System.getProperty('java.version')} (${System.getProperty('java.vm.vendor')})"
}
repositories {
jcenter()
}
dependencies {
compile group: 'org.scala-lang', name: 'scala-library', version: '2.10.+'
compile group: 'com.twitter', name: 'scrooge-generator_2.10', version: '3.17.0'
compile gradleApi()
compile localGroovy()
}
processResources {
from(['LICENSE', 'NOTICE']) {
into 'META-INF'
}
}
compileGroovy {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.encoding = 'UTF-8'
}
jar {
manifest {
attributes(
'Specification-Title': title,
'Specification-Version': version,
'Specification-Vendor': organizationName,
'Implementation-Title': title,
'Implementation-Version': version,
'Implementation-Vendor': organizationName,
'Implementation-Vendor-Id': organizationId,
'Implementation-Vendor-URL': organizationUrl,
'Created-By': createdBy,
)
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId archivesBaseName
from components.java
pom.withXml {
def projectNode = asNode()
projectNode.appendNode('name', title)
projectNode.appendNode('description', description)
projectNode.appendNode('url', organizationUrl)
def organizationNode = projectNode.appendNode('organization')
organizationNode.appendNode('name', organizationName)
organizationNode.appendNode('url', organizationUrl)
def licenseNode = projectNode.appendNode('licenses').appendNode('license')
licenseNode.appendNode('name', licenseName)
licenseNode.appendNode('url', licenseUrl)
licenseNode.appendNode('distribution', 'repo')
}
artifact sourcesJar
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}