Skip to content
Snippets Groups Projects
build.gradle 1.47 KiB
Newer Older
plugins {
    id 'java-library'
    id 'com.vanniktech.maven.publish' version '0.18.0'
}

java {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
akwizgran's avatar
akwizgran committed
    implementation project(':onionwrapper-core')
    def jna_version = '4.5.2'
    implementation "net.java.dev.jna:jna:$jna_version"
    implementation "net.java.dev.jna:jna-platform:$jna_version"
akwizgran's avatar
akwizgran committed

    testImplementation project(path: ':onionwrapper-core', configuration: 'testOutput')
    testImplementation 'junit:junit:4.13.2'
    testImplementation 'org.briarproject:tor-linux:0.4.7.13-2'
    testImplementation 'org.briarproject:obfs4proxy-linux:0.0.14-tor2'
    testImplementation 'org.briarproject:snowflake-linux:2.5.1'
mavenPublishing {
    pom {
        withXml {
            // Dependencies on other modules are represented in the POM with a groupId equal to
            // the project's name and an unspecified version. Rewrite them with the correct
            // groupId and version.
            Node pomNode = asNode()
            String name = pomNode.get('name').text()
            String groupId = pomNode.groupId.text()
            String version = pomNode.version.text()
            pomNode.dependencies.dependency.each() { node ->
                if (node.groupId.text() == name) {
                    node.groupId.each() { n -> n.value = groupId }
                    node.version.each() { n -> n.value = version }
                }
            }
        }
    }
}