Package: milib / 2.2.0+dfsg-1

build_gradle.patch Patch series | download
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
Description: changing the kotlin file into a proper file for gradle
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2022-07-01

--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,65 +1,27 @@
-import com.palantir.gradle.gitversion.VersionDetails
-import groovy.lang.Closure
 import java.net.InetAddress
 import java.util.*
 
-plugins {
-    `java-library`
-    `java-test-fixtures`
-    `maven-publish`
-    signing
-    id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
-    id("com.palantir.git-version") version "0.13.0" // don't upgrade, latest version that runs on Java 8
-}
-
-val productionBuild: Boolean? by project
-
-val versionDetails: Closure<VersionDetails> by extra
-val gitDetails = versionDetails()
-
-fun boolProperty(name: String): Boolean {
-    return ((properties[name] as String?) ?: "false").toBoolean()
-}
-
-val isMiCi = boolProperty("mi-ci")
-val isRelease = boolProperty("mi-release")
-
-val longTests: String? by project
-val miCiStage = properties["mi-ci-stage"] as String?
+apply plugin: 'java'
 
 group = "com.milaboratory"
-version = if (version != "unspecified") version else ""
 description = "MiLib"
 
-java {
-    sourceCompatibility = JavaVersion.VERSION_1_8
-    withSourcesJar()
-    withJavadocJar()
-}
-
-tasks.withType<JavaCompile> {
-    options.encoding = "UTF-8"
-}
+sourceCompatibility = JavaVersion.VERSION_1_8
 
 repositories {
     mavenCentral()
-
-    // Snapshot versions of redberry-pipe distributed via this repo
-    maven {
-        url = uri("https://pub.maven.milaboratory.com")
-    }
 }
 
-val jacksonBomVersion = "2.14.0"
-val junitVersion = "4.13.2"
-val redberryPipeVersion = "1.3.0"
+def jacksonBomVersion = "2.14.0"
+def junitVersion = "4.13.2"
+def redberryPipeVersion = "1.3.0"
 
 dependencies {
-    api("org.apache.commons:commons-math3:3.6.1")
-    api("cc.redberry:pipe:$redberryPipeVersion")
+    compile("org.apache.commons:commons-math3:3.6.1")
+    compile("cc.redberry:pipe:$redberryPipeVersion")
 
-    implementation(platform("com.fasterxml.jackson:jackson-bom:$jacksonBomVersion"))
-    implementation("com.fasterxml.jackson.core:jackson-databind")
+    implementation("com.fasterxml.jackson:jackson-bom:$jacksonBomVersion")
+    implementation("com.fasterxml.jackson.core:jackson-databind:2.x")
     implementation("org.apache.commons:commons-compress:1.21")
     implementation("commons-io:commons-io:2.11.0")
     implementation("org.lz4:lz4-java:1.8.0")
@@ -67,138 +29,28 @@
     implementation("net.sf.trove4j:trove4j:3.0.3")
     implementation("com.google.guava:guava:31.1-jre")
 
-    testFixturesImplementation("junit:junit:$junitVersion")
-    testFixturesImplementation(platform("com.fasterxml.jackson:jackson-bom:$jacksonBomVersion"))
-    testFixturesImplementation("com.fasterxml.jackson.core:jackson-databind")
+    testImplementation("junit:junit:$junitVersion")
+    testImplementation("com.fasterxml.jackson:jackson-bom:$jacksonBomVersion")
+    testImplementation("com.fasterxml.jackson.core:jackson-databind:2.x")
 
     testImplementation("junit:junit:$junitVersion")
     testImplementation("org.mockito:mockito-all:1.10.19")
 }
 
-val writeBuildProperties by tasks.registering(WriteProperties::class) {
-    outputFile = file("${sourceSets.main.get().output.resourcesDir}/${project.name}-build.properties")
-    property("version", version)
-    property("name", "MiLib")
-    property("revision", gitDetails.gitHash)
-    property("branch", gitDetails.branchName ?: "")
-    property("host", InetAddress.getLocalHost().hostName)
-    property("production", productionBuild == true)
-    property("timestamp", System.currentTimeMillis())
-}
-
-tasks.processResources {
-    dependsOn(writeBuildProperties)
-}
-
-val miRepoAccessKeyId: String? by project
-val miRepoSecretAccessKey: String? by project
-
-publishing {
-    repositories {
-        if (miRepoAccessKeyId != null) {
-            maven {
-                name = "mipub"
-                url = uri("s3://milaboratory-artefacts-public-files.s3.eu-central-1.amazonaws.com/maven")
-
-                authentication {
-                    credentials(AwsCredentials::class) {
-                        accessKey = miRepoAccessKeyId!!
-                        secretKey = miRepoSecretAccessKey!!
-                    }
-                }
-            }
+sourceSets {
+    test {
+        java {
+            srcDir 'src/test/java'
+            srcDir 'src/testFixtures/java'
         }
-    }
-
-    publications.create<MavenPublication>("mavenJava") {
-        from(components["java"])
-        pom {
-            withXml {
-                asNode().apply {
-                    appendNode("name", "MiLib")
-                    appendNode(
-                        "description",
-                        "Yet another Java library for Next Generation Sequencing (NGS) data processing."
-                    )
-                    appendNode("url", "https://milaboratories.com/")
-                }
-            }
-            licenses {
-                license {
-                    name.set("The Apache License, Version 2.0")
-                    url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
-                }
-            }
-            developers {
-                developer {
-                    id.set("dbolotin")
-                    name.set("Dmitry Bolotin")
-                    email.set("bolotin.dmitriy@gmail.com")
-                }
-                developer {
-                    id.set("PoslavskySV")
-                    name.set("Stanislav Poslavsky")
-                    email.set("stvlpos@mail.ru")
-                }
-                developer {
-                    id.set("mikesh")
-                    name.set("Mikhail Shugay")
-                    email.set("mikhail.shugay@gmail.com")
-                }
-            }
-            scm {
-                url.set("scm:git:https://github.com/milaboratory/milib")
-            }
+        resources {
+            srcDir 'src/testFixtures/resources'
         }
     }
 }
 
-val signingKey: String? by project
-if (signingKey != null) {
-    signing {
-        useInMemoryPgpKeys(
-            Base64.getMimeDecoder().decode(signingKey).decodeToString(),
-            ""
-        )
-        sign(publishing.publications["mavenJava"])
-    }
-}
-
-tasks.withType<Javadoc> {
-    options {
-        this as StandardJavadocDocletOptions
-        addStringOption("Xdoclint:none", "-quiet")
-    }
-}
-
-tasks.test {
+test {
     useJUnit()
     minHeapSize = "1024m"
     maxHeapSize = "2048m"
-
-    miCiStage?.let {
-        if (it == "test") {
-            systemProperty("longTests", "true");
-        }
-    }
-    longTests?.let { systemProperty("longTests", it) }
-}
-
-nexusPublishing {
-    repositories {
-        sonatype()
-    }
-}
-
-val checkPipeNotSnapshot by tasks.registering {
-    doLast {
-        if (redberryPipeVersion.contains('-'))
-            throw GradleException("Can't publish to maven central with snapshot dependencies.")
-    }
-}
-
-afterEvaluate {
-    tasks.named("publishToSonatype") {
-        dependsOn(checkPipeNotSnapshot)
-    }
 }