-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
175 lines (154 loc) · 4.5 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/*
* Copyright 2020 Thomas Nappo (Jire)
*
* 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.
*/
buildscript {
ext.your_name = 'Thomas Nappo'
ext.your_email = '[email protected]'
ext.your_github_name = 'jire'
ext.project_name = 'Strukt'
ext.project_description = 'C-style structs on the JVM!'
ext.project_group = 'org.jire.strukt'
ext.project_artifact = 'strukt'
ext.project_version = '4.1.0'
ext.project_license = 'The Apache Software License, Version 2.0'
ext.project_license_tag = 'Apache-2.0'
ext.project_license_url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
ext.kotlin_version = '1.4.21'
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "com.jfrog.bintray" version "1.8.5"
id "me.champeau.gradle.jmh" version "0.5.2"
}
apply plugin: 'java'
apply plugin: 'kotlin'
group project_artifact
version project_version
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
allprojects {
repositories {
jcenter()
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'java'
apply plugin: 'kotlin'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
maven(MavenPublication) {
from components.java
groupId project_group
artifactId project_artifact
version project_version
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name project_name
description project_description
url "https://github.com/$your_github_name/$project_name"
scm {
url "https://github.com/$your_github_name/$project_name"
connection "scm:git:git://github.com/$your_github_name/${project_name}.git"
developerConnection "scm:git:ssh:[email protected]:$your_github_name/${project_name}.git"
}
licenses {
license {
name project_license
url project_license_url
distribution 'repo'
}
}
developers {
developer {
id your_github_name
name your_name
email your_email
}
}
}
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
publications = ['maven']
pkg {
repo = 'maven'
name = project_name
licenses = [project_license_tag]
publicDownloadNumbers = true
websiteUrl = "https://github.com/$your_github_name/$project_name"
issueTrackerUrl = "https://github.com/$your_github_name/$project_name/issues"
vcsUrl = "https://github.com/$your_github_name/${project_name}.git"
githubRepo = "$your_github_name/$project_name"
version {
name = project_version
vcsTag = project_version
gpg {
sign = true
}
}
}
}
repositories {
jcenter()
}
dependencies {
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_version
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_version
implementation group: 'net.openhft', name: 'chronicle-core', version: '2.20.125'
implementation group: 'it.unimi.dsi', name: 'fastutil', version: '8.4.4'
implementation group: 'org.openjdk.jmh', name: 'jmh-core', version: '1.27'
implementation group: 'org.openjdk.jmh', name: 'jmh-generator-annprocess', version: '1.27'
annotationProcessor group: 'org.openjdk.jmh', name: 'jmh-generator-annprocess', version: '1.27'
}
jmh {
duplicateClassesStrategy = DuplicatesStrategy.EXCLUDE
}
compileKotlin {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
kotlinOptions {
freeCompilerArgs = ["-Xinline-classes"]
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}