这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 1 addition & 118 deletions support/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
def VERSION_NAME = '0.2.1'

buildscript {
repositories {
jcenter()
Expand All @@ -9,119 +7,4 @@ buildscript {
}
}

repositories {
jcenter()
}

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'

dependencies {
implementation 'com.google.code.gson:gson:2.8.5'
testImplementation 'junit:junit:4.12'
}

compileJava {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}

compileTestJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}

test {
testLogging {
exceptionFormat = 'full'
}
}

version = VERSION_NAME

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

ext {
publishedGroupId = 'com.shopify.graphql.support'
artifact = 'support'
libraryName = 'graphql-support'

libraryDescription = 'GraphQL support package generated client code'

siteUrl = 'https://github.com/Shopify/graphql_java_gen'
gitUrl = 'https://github.com/Shopify/graphql_java_gen.git'

licenseName = 'The MIT License'
licenseUrl = 'https://opensource.org/licenses/MIT'
allLicenses = ["MIT"]
}

group = publishedGroupId

install {
repositories.mavenInstaller {
// Generates POM.xml with proper parameters
pom {
project {
groupId publishedGroupId
artifactId artifact

name libraryName
description libraryDescription
url siteUrl

licenses {
license {
name licenseName
url licenseUrl
}
}

scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}

bintray {
/*
These values can be found on https://bintray.com/profile/edit
BINTRAY_USER : your personal profile name (from "Your Profile")
BINTRAY_KEY : found on the left menu, under "API Key"
*/
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')

configurations = ['archives']
publish = true
pkg {
userOrg = 'shopify'
repo = 'shopify-java'
name = libraryName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
version {
name = VERSION_NAME
}
}
}
apply from: 'graphql.java.gen.build.gradle'
124 changes: 124 additions & 0 deletions support/graphql.java.gen.build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
def VERSION_NAME = '0.2.1'

buildscript {
repositories {
jcenter()
}
}

repositories {
jcenter()
}

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this and the bintray block below be moved to the original build.gradle file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not necessary. We have the bintray artifacts already defined in the monorepo classpath. https://github.com/Shopify/android/blob/master/build.gradle#L447

Leaving this here allows us to publish from the monorepo, if we desire

Copy link
Member

@gantonious gantonious May 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm more thinking for third party users of this lib? More like thinking if some other random project pulls this in as a submodule and doesn't have bintray setup. Probably not a real issue given that no one has posted an issue about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, if you don't do anything special, you'd never know there were two files. This is only valuable to us, in our monorepo configuration, because of the way we support custom gradle file names. For us to even use this, I'll have to open a PR pointing to the new file.


dependencies {
implementation 'com.google.code.gson:gson:2.8.5'
testImplementation 'junit:junit:4.12'
}

compileJava {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}

compileTestJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}

test {
testLogging {
exceptionFormat = 'full'
}
}

version = VERSION_NAME

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

ext {
publishedGroupId = 'com.shopify.graphql.support'
artifact = 'support'
libraryName = 'graphql-support'

libraryDescription = 'GraphQL support package generated client code'

siteUrl = 'https://github.com/Shopify/graphql_java_gen'
gitUrl = 'https://github.com/Shopify/graphql_java_gen.git'

licenseName = 'The MIT License'
licenseUrl = 'https://opensource.org/licenses/MIT'
allLicenses = ["MIT"]
}

group = publishedGroupId

install {
repositories.mavenInstaller {
// Generates POM.xml with proper parameters
pom {
project {
groupId publishedGroupId
artifactId artifact

name libraryName
description libraryDescription
url siteUrl

licenses {
license {
name licenseName
url licenseUrl
}
}

scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}

bintray {
/*
These values can be found on https://bintray.com/profile/edit
BINTRAY_USER : your personal profile name (from "Your Profile")
BINTRAY_KEY : found on the left menu, under "API Key"
*/
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')

configurations = ['archives']
publish = true
pkg {
userOrg = 'shopify'
repo = 'shopify-java'
name = libraryName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
version {
name = VERSION_NAME
}
}
}