-
Notifications
You must be signed in to change notification settings - Fork 56
Distinguish missing vs null in var resolution (use default only when missing)
#58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0e14b3b
ec34971
27cd1c1
906effb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| version: '2.1' | ||
| orbs: | ||
| jvm: sailthru/[email protected] | ||
|
|
||
| parameters: | ||
| publish_snapshot: | ||
| description: Flag indicating a SNAPSHOT version should be built for this branch | ||
| type: boolean | ||
| default: false | ||
|
|
||
| workflows: | ||
| build: | ||
| unless: << pipeline.parameters.publish_snapshot >> | ||
| jobs: | ||
| - jvm/test: | ||
| context: | ||
| - Docker Hub | ||
| - Nexus Credentials | ||
| filters: | ||
| branches: | ||
| only: /.*/ | ||
| tags: | ||
| ignore: /.*/ | ||
|
|
||
| publish: | ||
| jobs: | ||
| - jvm/publish_jar: | ||
| context: | ||
| - Docker Hub | ||
| - Nexus Credentials | ||
| filters: | ||
| branches: | ||
| ignore: /.*/ | ||
| tags: | ||
| only: /^v\d+.\d+.\d+$/ | ||
| version: ${CIRCLE_TAG} | ||
|
|
||
| publish_snapshot: | ||
| when: << pipeline.parameters.publish_snapshot >> | ||
| jobs: | ||
| - jvm/publish_jar: | ||
| name: Publish SNAPSHOT JAR | ||
| context: | ||
| - Docker Hub | ||
| filters: | ||
| branches: | ||
| only: /.*/ | ||
| tags: | ||
| ignore: /.*/ | ||
| # add "v" in front so the branch is > than actual version tags | ||
| version: v${CIRCLE_BRANCH}-SNAPSHOT |
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this change |
This file was deleted.
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this change |
This file was deleted.
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as before - bundling two different changes in a PR (missing + gradle changes) isn't ideal. I don't want to discuss two changes in a single PR. the code for MISSING seems fine and can be deployed, but this is something I'd like to think about more. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,110 +1,19 @@ | ||
| import com.sailthru.gradle.ProjectType | ||
|
|
||
| plugins { | ||
| id "java" | ||
| id "maven" | ||
| id "signing" | ||
| id("java-library") | ||
| id("com.sailthru.gradle") version("v0.16.0") | ||
| } | ||
|
|
||
| group "io.github.jamsesso" | ||
| version "1.1.1-SNAPSHOT" | ||
|
|
||
| sourceCompatibility = 1.8 | ||
| targetCompatibility = 1.8 | ||
|
|
||
| repositories { | ||
| mavenCentral() | ||
| } | ||
| group "com.sailthru" | ||
|
|
||
| dependencies { | ||
| compile "com.google.code.gson:gson:2.8.5" | ||
| testCompile "junit:junit:4.12" | ||
| } | ||
|
|
||
| task javadocJar(type: Jar, dependsOn: javadoc) { | ||
| classifier = "javadoc" | ||
| from javadoc.destinationDir | ||
| } | ||
|
|
||
| task sourcesJar(type: Jar) { | ||
| classifier = "sources" | ||
| from sourceSets.main.allSource | ||
| } | ||
|
|
||
| test { | ||
| testLogging { | ||
| events "passed", "skipped", "failed" | ||
| exceptionFormat "full" | ||
| showStandardStreams = true | ||
| } | ||
| } | ||
|
|
||
| artifacts { | ||
| archives jar, javadocJar, sourcesJar | ||
| } | ||
|
|
||
| def getSonatypeUsername() { | ||
| return System.getenv('SONATYPE_USERNAME') | ||
| } | ||
|
|
||
| def getSonatypePassword() { | ||
| return System.getenv('SONATYPE_PASSWORD') | ||
| } | ||
|
|
||
| def hasCredentials() { | ||
| def result = getSonatypeUsername() != null && getSonatypePassword() != null | ||
| if (!result) { | ||
| println "Cannot publish package since Sonatype credentials are not set. Please set SONATYPE_USERNAME and SONATYPE_PASSWORD environment variables." | ||
| } | ||
| return result | ||
| } | ||
|
|
||
| signing { | ||
| required { gradle.taskGraph.hasTask("uploadArchives") } | ||
| useInMemoryPgpKeys(System.getenv('SIGNING_KEY'), System.getenv('SIGNING_PASSWORD')) | ||
| sign configurations.archives | ||
| implementation('com.google.code.gson:gson:2.13.1') | ||
| testImplementation('junit:junit:4.13.2') | ||
| } | ||
|
|
||
| uploadArchives { | ||
| repositories { | ||
| mavenDeployer { | ||
| beforeDeployment { deployment -> signing.signPom(deployment) } | ||
|
|
||
| repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
| authentication(userName: getSonatypeUsername(), password: getSonatypePassword()) | ||
| } | ||
|
|
||
| snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { | ||
| authentication(userName: getSonatypeUsername(), password: getSonatypePassword()) | ||
| } | ||
|
|
||
| pom.project { | ||
| name "json-logic-java" | ||
| artifactId "json-logic-java" | ||
| packaging "jar" | ||
| description "A native Java implementation of the json-logic project" | ||
| url "https://github.com/jamsesso/json-logic-java" | ||
|
|
||
| scm { | ||
| connection "scm:[email protected]:jamsesso/json-logic-java.git" | ||
| developerConnection "scm:[email protected]:jamsesso/json-logic-java.git" | ||
| url "https://github.com/jamsesso/json-logic-java.git" | ||
| } | ||
|
|
||
| licenses { | ||
| license { | ||
| name "MIT License" | ||
| url "https://github.com/jamsesso/json-logic-java/blob/master/LICENSE" | ||
| } | ||
| } | ||
|
|
||
| developers { | ||
| developer { | ||
| id "jamsesso" | ||
| name "Sam Jesso" | ||
| email "[email protected]" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| onlyIf { hasCredentials() } | ||
| sailthru { | ||
| type = ProjectType.LIBRARY | ||
| javaVersion = JavaVersion.VERSION_1_8 | ||
| checkstyleEnabled = false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # This is a Gradle generated file for dependency locking. | ||
| # Manual edits can break the build and are not advised. | ||
| # This file is expected to be part of source control. | ||
| com.google.code.findbugs:jsr305:3.0.2=checkstyle | ||
| com.google.code.gson:gson:2.13.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath | ||
| com.google.errorprone:error_prone_annotations:2.38.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath | ||
| com.google.errorprone:error_prone_annotations:2.7.1=checkstyle | ||
| com.google.guava:failureaccess:1.0.1=checkstyle | ||
| com.google.guava:guava:31.0.1-jre=checkstyle | ||
| com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=checkstyle | ||
| com.google.j2objc:j2objc-annotations:1.3=checkstyle | ||
| com.puppycrawl.tools:checkstyle:9.3=checkstyle | ||
| commons-beanutils:commons-beanutils:1.9.4=checkstyle | ||
| commons-collections:commons-collections:3.2.2=checkstyle | ||
| info.picocli:picocli:4.6.2=checkstyle | ||
| junit:junit:4.13.2=testCompileClasspath,testRuntimeClasspath | ||
| net.sf.saxon:Saxon-HE:10.6=checkstyle | ||
| org.antlr:antlr4-runtime:4.9.3=checkstyle | ||
| org.checkerframework:checker-qual:3.12.0=checkstyle | ||
| org.hamcrest:hamcrest-core:1.3=testCompileClasspath,testRuntimeClasspath | ||
| org.javassist:javassist:3.28.0-GA=checkstyle | ||
| org.reflections:reflections:0.10.2=checkstyle | ||
| empty=annotationProcessor,testAnnotationProcessor |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| version=vSANDBOX |
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fine upgrading Gradle, but can this be done in another PR? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| #Mon Jul 02 21:26:44 ADT 2018 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip | ||
| networkTimeout=10000 | ||
| validateDistributionUrl=true | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove