2 Star 5 Fork 2

dou dou/rains-graphql-java-extended

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 6.89 KB
一键复制 编辑 原始数据 按行查看 历史
dou dou 提交于 2019-11-05 14:41 . version 2.10.5
/*
* Copyright 2019 hugoDD
*
* 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.
*/
/**
* @author <ahref='mailto:280555235@qq.com' > hugoDD</a>
*/
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath "com.github.ben-manes:gradle-versions-plugin:$gradleVersionsPluginVersion"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:$gradleArtifactoryPluginVersion"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$gradleBintrayPluginVersion"
}
}
apply plugin: 'idea'
idea {
module {
downloadJavadoc = false
downloadSources = false
inheritOutputDirs = false
outputDir = file("$buildDir/classes/main/")
}
}
subprojects {
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
if (System.getenv('ARTIFACTORY_CONTEXT_URL')) {
apply plugin: 'com.jfrog.artifactory'
}
apply plugin: 'groovy'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'com.jfrog.bintray'
version = projectVersion
group = 'com.rains.graphql'
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/andimarek/graphql-java/' }
}
dependencies {
testCompile 'org.spockframework:spock-core:1.2-groovy-2.5'
testCompile "org.codehaus.groovy:groovy-all:$groovyVersion"
}
idea {
module {
downloadJavadoc = false
downloadSources = false
inheritOutputDirs = false
outputDir = file("$buildDir/classes/main/")
}
}
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
if (it.name != 'graphql-extended-sample-app') {
jar {
from 'LICENSE'
}
task sourcesJar(type: Jar) {
dependsOn classes
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
publishing {
publications {
mainProjectPublication(MavenPublication) {
version project.version
from components.java
artifact sourcesJar {
classifier 'sources'
}
artifact javadocJar {
classifier 'javadoc'
}
pom.withXml {
// Fix dependency scoping.
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name projectName
description projectDescription
url projectGitRepoUrl
scm {
url projectGitRepoUrl
connection projectGitRepoUrl
developerConnection projectGitRepoUrl
}
licenses {
license {
name projectLicense
url projectLicenseUrl
distribution 'repo'
}
}
developers {
developer {
id 'hugoDD'
name 'hugoDD'
}
}
}
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER') ?: project.findProperty('BINTRAY_USER') ?: ''
key = System.getenv('BINTRAY_KEY') ?: project.findProperty('BINTRAY_KEY') ?: ''
publications = ['mainProjectPublication']
publish = !projectVersion.contains('SNAPSHOT')
override = false
pkg {
repo = 'maven'
name = projectName
desc = projectDescription
licenses = [projectLicense]
vcsUrl = projectGitRepoUrl
version {
name = project.version
gpg {
sign = true
}
mavenCentralSync {
sync = !projectVersion.contains('SNAPSHOT')
user = System.getenv('SONATYPE_USER')
password = System.getenv('SONATYPE_PASSWORD')
close = '1'
}
}
}
}
if (System.getenv('ARTIFACTORY_CONTEXT_URL')) {
artifactory {
contextUrl = System.getenv('ARTIFACTORY_CONTEXT_URL')
publish {
defaults {
publications('mainProjectPublication')
publishArtifacts = true
publishPom = true
}
repository {
repoKey = "${version.contains('SNAPSHOT') ? (System.getenv('ARTIFACTORY_SNAPSHOT_REPO_KEY') ?: 'libs-snapshot-local') : (System.getenv('ARTIFACTORY_RELEASE_REPO_KEY') ?: 'libs-release-local')}"
username = System.getenv('ARTIFACTORY_USERNAME') ?: 'admin'
password = System.getenv('ARTIFACTORY_PASSWORD') ?: 'password'
}
}
}
}
}
}
wrapper {
gradleVersion = gradleWrapperVersion
distributionType = Wrapper.DistributionType.ALL
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/hugosz/rains-graphql-java-extended.git
git@gitee.com:hugosz/rains-graphql-java-extended.git
hugosz
rains-graphql-java-extended
rains-graphql-java-extended
master

搜索帮助