Added some old commits...
[ariane.git] / build.gradle
blobe9775befe07a7cfd55f1be9f9f63d5d32af121d1
1 //The current version of ariane
2 version = '0.0.80'
4 buildscript
6   repositories
7   {
8     mavenCentral()
9     
10     //In order to use the about and duplicates plugins
11     maven { url 'http://evgenyg.artifactoryonline.com/evgenyg/repo/' }
12   }
14   dependencies
15   {
16     //The plugins
17     classpath   'com.github.goldin.plugins.gradle:about:0.2',
18                 'com.github.goldin.plugins.gradle:duplicates:0.2',
19                 'com.github.ben-manes:gradle-versions-plugin:0.3'
20   }
23 allprojects
25   //In order to be able to use eclipse in all projects
26   apply plugin: 'eclipse'
27   
28   //In order to be able to use intellij idea in all projects
29   apply plugin: 'idea'
31   idea.module
32   {
33     downloadSources = false
34     downloadJavadoc = true
35     excludeDirs += file( 'out' )
36   }
39 idea.project
41   ipr.withXml { provider -> provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git' }
44 subprojects
46   
47   //In order to apply the java template to all subprojects
48   apply plugin: 'java'
49   
50   //In order to create an report with project and build information
51   apply plugin: 'project-report'
52   
53   //In order to create some information about the projects in their jars
54   apply plugin: 'about'
55   
56   //In order to check if the dependencies have an version bump
57   apply plugin: 'versions'
58   
59   //In order to check for possible duplicated dependencies
60   apply plugin: 'duplicates'
61   
62   //In order to create an distribution zip with the jars of this bundle
63   apply plugin: 'java-library-distribution'
64   
65   //The name of the distribution, that is the name of the subproject
66   distribution
67   {
68     name = project.name
69   }
70   
71   //Copy the readme.md and licence.txt files into the dist dir
72   distZip 
73   {
74     from('README.md')
75     from('LICENSE.txt')
76     {
77         into('dist')
78     }
79   }
80   
81   repositories
82   {
83     mavenCentral()
84     mavenRepo url: 'http://download.java.net/maven/2/'
85     mavenRepo url: 'http://repository-netty.forge.cloudbees.com/snapshot/'
86     mavenRepo url: 'http://www.knopflerfish.org/maven2/'
87     //mavenRepo url: 'http://evgenyg.artifactoryonline.com/evgenyg/repo/'
88   }
89   
90   //Task to create the directories needed for gradle in an newly created subproject
91   task "create-dirs" << {
92     sourceSets*.java.srcDirs*.each { it.mkdirs() }
93     sourceSets*.resources.srcDirs*.each { it.mkdirs() }
94   }
95   
96   //The configurations to look for duplicates
97   duplicates
98   {
99     configurations = [ 'compile', 'testCompile' ]
100   }
102   //The configurations to use in the about file
103   about
104   { 
105     includeDependencies = [ 'compile', 'runtime' ]
106     prefix = '/' 
107   }
109   //In order to add an about file to the final subproject jar
110   jar 
111   { 
112     dependsOn 'about' 
113   }
115   //Some common dependencies
116   dependencies 
117   {
118     //The slf4j logging api
119     compile 'org.slf4j:slf4j-api:1.7.2'
120     
121     //The slf4j implementation, that is logback
122     compile('ch.qos.logback:logback-classic:1.0.9')
123     {
124       exclude group: 'com.h2database', module: 'h2'
125       exclude group: 'com.icegreen', module: 'greenmail'
126       exclude group: 'hsqldb', module: 'hsqldb'
127       exclude group: 'javax.mail', module: 'mail'
128       exclude group: 'javax.servlet', module: 'servlet-api'
129       exclude group: 'mysql', module: 'mysql-connector-java'
130       exclude group: 'org.apache.felix', module: 'org.apache.felix.main'
131       exclude group: 'org.apache.geronimo.specs', module: 'geronimo-jms_1.1_spec'
132       exclude group: 'org.codehaus.groovy', module: 'groovy-all'
133       exclude group: 'org.slf4j', module: 'log4j-over-slf4j'
134       exclude group: 'org.slf4j', module: 'slf4j-ext'
135       exclude group: 'org.subethamail', module: 'subethasmtp'
136       exclude group: 'postgresql', module: 'postgresql'
137     }
138     
139     //An extension api for slf4j
140     compile('org.slf4j:slf4j-ext:1.7.2')
141     {
142       exclude group: 'org.slf4j', module: 'slf4j-log4j12'
143     }
144     
145     //An implementation of jackarta commons loggins over slf4j
146     compile('org.slf4j:jcl-over-slf4j:1.7.2')
147     {
148       exclude group: 'org.slf4j', module: 'slf4j-jdk14'
149     }
150     
151     //An implementation of log4j over slf4j
152     compile('org.slf4j:log4j-over-slf4j:1.7.2')
153     {
154       exclude group: 'org.slf4j', module: 'slf4j-jdk14'
155     }
156     
157     //An implementation of osgi log manager using slf4j
158     compile('org.slf4j:osgi-over-slf4j:1.7.2')
159     {
160       exclude group: 'org.slf4j', module: 'slf4j-simple'
161     }
162     
163     //An library to generate uuid based on time
164     compile('com.fasterxml.uuid:java-uuid-generator:3.1.3')
165     {
166       exclude group: 'junit', module: 'junit'
167       exclude group: 'log4j', module: 'log4j'
168     }
169     
170     //An library of utilities created by google
171     compile 'com.google.guava:guava:14.0-rc2'
172     
173     //An library to handle with time in a precise way
174     compile('joda-time:joda-time:2.1')
175     {
176       exclude group: 'junit', module: 'junit'
177     }
178     
179     //The knopflerfish osgi framework
180     compile 'org.knopflerfish.framework:framework:5.3.3'
181     
182     //The library used to test the subprojects
183     testCompile 'junit:junit:4.11'
184   }
185