Skip to content

Commit f435e15

Browse files
ob-stripemickjermsurawong-stripe
authored andcommitted
stripe-java v9.0.0 (#700)
* Drop support for Java 1.7 * Upgrade dev dependencies (except JUnit) * Upgrade to JUnit 5 * Use ErrorProne in builds * Return unsafe deserialized event data object as Option (#723) * return as option * update doc * Autogen params (#705) * test: typed param setup - fix ambiguous call with null casting test: CardTest ambiguous call with typed param * Basic primitives for typed params (#679) * extract common deserializer method extract common logic * implement ApiParamRequest add api param request * Add to base test lenient request params comparison for list/array int/long comparison * use List<Object> instead of Object[] in untyped deserializer * provide documentation to deserializer and api request param * reorder import statments * fix other imports in new files * test: Standardization consider request param as map param * rename and add more test (#718) * Fix remaining ErrorProne warnings * Verify deserialized boolean params to map (#722) * verify boolean behavior * add suppress warning * Generated for V9.0 [generated] source: spec3.sdk.yaml@non-master-spec-fb07de8 in mickjer… (#711) * test: typed params path query expand and limit * test: typed params on methods previously had params as string constant * test: typed params on polymoprhic of EMPTY and array test: use new empty param * test: typed params on inner object * test: typed params by collection methods * test: typed param fix to singular * test: typed param create token with different instruments test: Token with ObjectType enum test: typed params create token * test: typed params create charge test: typed params charge * generated: param * generated: model * generated: param * [generated] source: spec3.sdk.yaml@non-master-spec-d9e92b9 in mickjermsurawong/working-autogen * [ErrorProne fix: add @OverRide to enum get value][generated] source: spec3.sdk.yaml@non-master-spec-d9e92b9 in mickjermsurawong/working-autogen * [Rename Number to card details][generated] source: spec3.sdk.yaml@non-master-spec-c5dbddd in mickjermsurawong/working-autogen * [Sort setter methods][generated] source: spec3.sdk.yaml@non-master-spec-97a62f7 in gen-param-default * test: remove getters from params * test: create webhook with event enums * test: typed param addAll/putAll * [generated] source: spec3.sdk.yaml@non-master-spec-6e9fab7 in mickjermsurawong/default-gen-param * Update doc on previous attributes array representation (#726) * update doc about array representation * fix another typo * Another dependency version bump * Fix docs on getting stripe object from `EventDataObjectDeserializer` (#727) * update docs on get object * Add missing Javadoc * Add non-autogen typed params Event/File/EphemeralKeys (#730) * file create params with handling of file object * create file with typed params * list file with typed params update import order on files refactor file test * add ephemeral key create params * add event list params * null check for typed parameters
1 parent 6d352b6 commit f435e15

File tree

464 files changed

+62901
-1019
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

464 files changed

+62901
-1019
lines changed

.travis.yml

-13
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@ sudo: required
22

33
language: java
44

5-
addons:
6-
hosts:
7-
- short-hostname
8-
hostname: short-hostname
9-
105
before_install:
11-
# Work around missing crypto in openjdk7
12-
- |
13-
if [ "$TRAVIS_JDK_VERSION" == "openjdk7" ]; then
14-
sudo wget "https://bouncycastle.org/download/bcprov-jdk15on-160.jar" -O "${JAVA_HOME}/jre/lib/ext/bcprov-jdk15on-160.jar"
15-
sudo perl -pi.bak -e 's/^(security\.provider\.)([0-9]+)/$1.($2+1)/ge' /etc/java-7-openjdk/security/java.security
16-
echo "security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider" | sudo tee -a /etc/java-7-openjdk/security/java.security
17-
fi
186
# Unpack and start stripe-mock so that the test suite can talk to it
197
- |
208
if [ ! -d "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}" ]; then
@@ -33,7 +21,6 @@ env:
3321

3422
matrix:
3523
include:
36-
- jdk: openjdk7
3724
- jdk: oraclejdk8
3825
- jdk: openjdk8
3926
- jdk: oraclejdk9

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ You can sign up for a Stripe account at https://stripe.com.
44

55
## Requirements
66

7-
Java 1.7 or later.
7+
Java 1.8 or later.
88

99
## Installation
1010

build.gradle

+21-17
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@ buildscript {
55
//maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
66
}
77
dependencies {
8-
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.11.0"
8+
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.20.0"
99
}
1010
}
1111

1212
plugins {
1313
id 'java'
1414
id 'maven'
15-
id 'io.franzbecker.gradle-lombok' version '1.14'
15+
id 'io.franzbecker.gradle-lombok' version '2.1'
16+
id "net.ltgt.errorprone" version "0.7.1"
1617
id 'checkstyle'
17-
id 'net.saliman.cobertura' version '2.5.4'
18+
id 'net.saliman.cobertura' version '2.6.1'
1819
id 'com.github.kt3k.coveralls' version '2.8.2'
19-
id 'osgi'
20+
id 'biz.aQute.bnd.builder' version '4.2.0'
2021
}
2122

22-
sourceCompatibility = 1.7
23-
targetCompatibility = 1.7
23+
sourceCompatibility = 1.8
24+
targetCompatibility = 1.8
2425

2526
group = GROUP
2627
version = VERSION_NAME
@@ -43,28 +44,30 @@ repositories {
4344

4445
dependencies {
4546
compile group: 'com.google.code.gson', name: 'gson', version:'2.8.5'
46-
testCompile group: 'com.google.guava', name: 'guava', version:'26.0-android' // Use Android flavor for JDK7 compatiblity
47-
testCompile group: 'junit', name: 'junit', version:'4.12'
48-
testCompile group: 'org.mockito', name: 'mockito-core', version:'2.22.0'
49-
testRuntime group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
50-
testImplementation 'com.squareup.okhttp3:mockwebserver:3.12.1'
47+
errorprone group: 'com.google.errorprone', name: 'error_prone_core', version: '2.3.3'
48+
errorproneJavac group: 'com.google.errorprone', name: 'javac', version:'9+181-r4173-1'
49+
testCompile group: 'com.google.guava', name: 'guava', version:'27.1-jre'
50+
testCompile group: 'org.mockito', name: 'mockito-core', version:'2.26.0'
51+
testRuntime group: 'org.slf4j', name: 'slf4j-api', version: '1.7.26'
52+
testImplementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '3.14.0'
53+
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.4.1'
54+
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.4.1'
5155
}
5256

5357
jar {
5458
manifest {
5559
attributes("Implementation-Title": POM_NAME,
5660
"Implementation-Version": VERSION_NAME,
57-
"Implementation-Vendor": VENDOR_NAME)
61+
"Implementation-Vendor": VENDOR_NAME,
62+
"Bundle-SymbolicName": POM_ARTIFACT_ID,
63+
"Export-Package": 'com.stripe.*')
5864

5965
version = VERSION_NAME
60-
symbolicName = POM_ARTIFACT_ID
61-
62-
instruction 'Export-Package', '*'
6366
}
6467
}
6568

6669
lombok {
67-
version = "1.18.2"
70+
version = "1.18.6"
6871
sha256 = ""
6972
}
7073

@@ -108,14 +111,15 @@ javadoc {
108111
apply from: 'deploy.gradle'
109112

110113
test {
114+
useJUnitPlatform()
111115
testLogging {
112116
events "passed", "skipped", "failed"
113117
exceptionFormat "full"
114118
}
115119
}
116120

117121
checkstyle {
118-
toolVersion = '8.16'
122+
toolVersion = '8.19'
119123
}
120124

121125
cobertura {

gradle/wrapper/gradle-wrapper.jar

1.17 KB
Binary file not shown.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"

gradlew.bat

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem http://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

1632
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
33+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1834

1935
@rem Find java.exe
2036
if defined JAVA_HOME goto findJavaFromJavaHome

0 commit comments

Comments
 (0)