| 1 | Description: removing parts of build.gradle that are not useful for a Debian build |
| 2 | Adding the "-g" flag when building the C library, to get debug symbols. |
| 3 | Also renaming the project to "gatk-fermilite". |
| 4 | Author: Pierre Gruet <[email protected]> |
| 5 | Forwarded: not-needed |
| 6 | Last-Update: 2022-03-24 |
| 7 | |
| 8 | --- a/build.gradle |
| 9 | +++ b/build.gradle |
| 10 | @@ -1,14 +1,6 @@ |
| 11 | -buildscript { |
| 12 | - repositories { |
| 13 | - jcenter() |
| 14 | - } |
| 15 | -} |
| 16 | - |
| 17 | plugins { |
| 18 | id 'java' |
| 19 | id 'maven' |
| 20 | - id 'signing' |
| 21 | - id 'com.palantir.git-version' version '0.5.1' //version helper |
| 22 | } |
| 23 | |
| 24 | |
| 25 | @@ -20,8 +12,6 @@ |
| 26 | testCompile 'org.testng:testng:6.9.6' |
| 27 | } |
| 28 | |
| 29 | -final isRelease = Boolean.getBoolean("release") |
| 30 | -version = (isRelease ? gitVersion() : gitVersion() + "-SNAPSHOT").replaceAll(".dirty", "") |
| 31 | group = "org.broadinstitute" |
| 32 | String cpath = "src/main/c" |
| 33 | String libname = "libfml" |
| 34 | @@ -49,8 +39,8 @@ |
| 35 | |
| 36 | processResources { |
| 37 | dependsOn buildFermiLib |
| 38 | - from cpath |
| 39 | - include "$libname*" |
| 40 | +// from cpath |
| 41 | +// include "$libname*" |
| 42 | } |
| 43 | |
| 44 | test { |
| 45 | @@ -82,86 +72,3 @@ |
| 46 | from sourceSets.main.allSource |
| 47 | classifier = 'sources' |
| 48 | } |
| 49 | - |
| 50 | -/** |
| 51 | - *This specifies what artifacts will be built and uploaded when performing a maven upload. |
| 52 | - */ |
| 53 | -artifacts { |
| 54 | - archives jar |
| 55 | - archives javadocJar |
| 56 | - archives sourcesJar |
| 57 | -} |
| 58 | - |
| 59 | -/** |
| 60 | - * Sign non-snapshot releases with our secret key. This should never need to be invoked directly. |
| 61 | - */ |
| 62 | -signing { |
| 63 | - required { isRelease && gradle.taskGraph.hasTask("uploadArchives") } |
| 64 | - sign configurations.archives |
| 65 | -} |
| 66 | - |
| 67 | -def assertLibExists(lib){ |
| 68 | - if ( ! file(lib).exists()){ |
| 69 | - throw new GradleException("Could not perform a maven release because $lib is missing. You must include both OSX and Linux binaries to release. " + |
| 70 | - "You can run scripts/build_both_dylib_and_so.sh to build both if you are on a Broad Institute connected mac.") |
| 71 | - } |
| 72 | -} |
| 73 | - |
| 74 | -/** |
| 75 | - * Upload a release to sonatype. You must be an authorized uploader and have your sonatype |
| 76 | - * username and password information in your gradle properties file. See the readme for more info. |
| 77 | - * |
| 78 | - * For releasing to your local maven repo, use gradle install |
| 79 | - */ |
| 80 | -uploadArchives { |
| 81 | - doFirst { |
| 82 | - println "Attempting to upload version:$version" |
| 83 | - if (isRelease){ |
| 84 | - assertLibExists("$cpath/${libname}.Linux.so") |
| 85 | - assertLibExists("$cpath/${libname}.Darwin.dylib") |
| 86 | - } |
| 87 | - } |
| 88 | - repositories { |
| 89 | - mavenDeployer { |
| 90 | - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } |
| 91 | - |
| 92 | - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { |
| 93 | - authentication(userName: project.findProperty("sonatypeUsername"), password: project.findProperty("sonatypePassword")) |
| 94 | - } |
| 95 | - |
| 96 | - snapshotRepository(url: "https://artifactory.broadinstitute.org/artifactory/libs-snapshot-local/") { |
| 97 | - authentication(userName: System.env.ARTIFACTORY_USERNAME, password: System.env.ARTIFACTORY_PASSWORD) |
| 98 | - } |
| 99 | - |
| 100 | - pom.project { |
| 101 | - name 'gatk-fermilite-jni' |
| 102 | - packaging 'jar' |
| 103 | - description 'java Bindings for the fermi-lite assembler' |
| 104 | - url 'http://github.com/broadinstitute/gatk-fermlite-jni' |
| 105 | - |
| 106 | - scm { |
| 107 | - url 'scm:[email protected]:broadinstitute/gatk-fermlite-jni.git' |
| 108 | - connection 'scm:[email protected]:broadinstitute/gatk-fermilite-jni.git' |
| 109 | - developerConnection 'scm:[email protected]:broadinstitute/gatk-fermilite-jni.git' |
| 110 | - } |
| 111 | - |
| 112 | - developers { |
| 113 | - developer { |
| 114 | - id = "gatkdev" |
| 115 | - name = "GATK Development Team" |
| 116 | - email = "[email protected]" |
| 117 | - } |
| 118 | - } |
| 119 | - |
| 120 | - licenses { |
| 121 | - license { |
| 122 | - name 'BSD 3-Clause' |
| 123 | - url 'https://github.com/broadinstitute/gatk-fermilite-jni/blob/master/LICENSE.TXT' |
| 124 | - distribution 'repo' |
| 125 | - } |
| 126 | - } |
| 127 | - } |
| 128 | - } |
| 129 | - } |
| 130 | -} |
| 131 | - |
| 132 | --- a/src/main/c/Makefile |
| 133 | +++ b/src/main/c/Makefile |
| 134 | @@ -3,7 +3,7 @@ |
| 135 | endif |
| 136 | |
| 137 | JNI_INCLUDE_DIRS=$(addprefix -I,$(shell find $(JAVA_HOME)/include -type d)) |
| 138 | -CFLAGS=-O2 -Wall -fPIC $(JNI_INCLUDE_DIRS) |
| 139 | +CFLAGS=-g -O2 -Wall -fPIC $(JNI_INCLUDE_DIRS) |
| 140 | CC=gcc |
| 141 | |
| 142 | #OS-dependent extension lookup |
| 143 | --- a/settings.gradle |
| 144 | +++ b/settings.gradle |
| 145 | @@ -1 +1 @@ |
| 146 | -rootProject.name = "gatk-fermilite-jni" |
| 147 | +rootProject.name = "gatk-fermilite" |