plugins { id 'java' id 'java-library' id 'maven-publish' id 'signing' } apply from: '../spotless.gradle' sourceSets { main { java { srcDirs 'src/main/src', 'src/main/thirdparty', 'src/main/test' } resources { srcDir 'src/main/resources' } } test { java { srcDir 'src/test/java' } resources { srcDir 'src/test/resources' } } } dependencies { api project (":common") api 'io.netty:netty-tcnative-boringssl-static:2.0.59.Final' api 'com.google.code.gson:gson:2.8.8' testImplementation 'junit:junit:4.13.2' } version = "1.0.1" task classJar(type: Jar, dependsOn: classes) { classifier = "jar" } task sourceJar(type: Jar, dependsOn: classes) { archiveClassifier = "sources" classifier = "sources" from sourceSets.main.allSource duplicatesStrategy = DuplicatesStrategy.EXCLUDE } tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') } task javadocJar(type: Jar, dependsOn: javadoc) { archiveClassifier = 'javadoc' classifier = "javadoc" exclude { details -> details.file.getAbsolutePath().contains("/gm/") } from javadoc.destinationDir } publishing { publications { mavenJava(MavenPublication) { groupId project.group artifactId "front-base" version "${version}" from components.java artifact sourceJar artifact javadocJar artifact classJar pom { name = "bdware-front-base" description = "front-base" url = "https://gitee.com/BDWare/front-base" licenses { license { name = "Mulan PSL v2" url = "http://license.coscl.org.cn/MulanPSL2" } } developers { developer { id = "dataware" email = "caihq@pku.edu.cn" } } scm { connection = "scm:git:https://gitee.com/BDWare/front-base.git" developerConnection = "scm:git:https://gitee.com/BDWare/front-base.git" url = "https://gitee.com/BDWare/front-base" } } } } repositories { maven { name 'bdwareSnapshot' url 'https://oss.sonatype.org/content/repositories/snapshots' credentials { username = "${NEXUS_USERNAME}" password = "${NEXUS_PASSWORD}" } } maven { name 'bdware' url 'https://oss.sonatype.org/service/local/staging/deploy/maven2' credentials { username = "${NEXUS_USERNAME}" password = "${NEXUS_PASSWORD}" } } } } signing { sign publishing.publications.mavenJava }