8000 Merge pull request #212 from AuthorizeNet/future · AuthorizeNet/sdk-java@b1ef536 · GitHub
[go: up one dir, main page]

Skip to content

Commit b1ef536

Browse files
authored
Merge pull request #212 from AuthorizeNet/future
Future
2 parents c76c9a1 + d6b7f85 commit b1ef536

File tree

278 files changed

+917
-796
lines changed
  • controller/base
  • util
  • Some content is hidden

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

    278 files changed

    +917
    -796
    lines changed

    .classpath

    Lines changed: 0 additions & 40 deletions
    This file was deleted.

    .github/workflows/java-workflow.yml

    Lines changed: 73 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,73 @@
    1+
    name: Authorize.net Java CI
    2+
    on:
    3+
    push:
    4+
    pull_request:
    5+
    workflow_dispatch:
    6+
    env:
    7+
    sdk_java: 'sdk-java'
    8+
    sample_code_java: 'sample-code-java'
    9+
    jobs:
    10+
    workflow-job:
    11+
    defaults:
    12+
    run:
    13+
    shell: bash
    14+
    strategy:
    15+
    fail-fast: false
    16+
    matrix:
    17+
    operating-system: [ubuntu-latest, macos-latest, windows-latest]
    18+
    java-version: ['8'] # , '11', '16', '17', '18', '19', '20', '21', '22'] # Blocking higher versions SDK using jaxb
    19+
    distribution: ['temurin']
    20+
    runs-on: ${{matrix.operating-system}}
    21+
    steps:
    22+
    - name: Creating separate folders for SDK and Sample Codes
    23+
    run: |
    24+
    rm -rf $sdk_java
    25+
    rm -rf $sample_code_java
    26+
    mkdir $sdk_java $sample_code_java
    27+
    - name: Checkout authorizenet/sdk-java
    28+
    uses: actions/checkout@v4
    29+
    with:
    30+
    path: ${{env.sdk_java}}
    31+
    - name: Checkout authorizenet/sample-code-java
    32+
    uses: actions/checkout@v4
    33+
    with:
    34+
    repository: 'authorizenet/sample-code-java'
    35+
    ref: 'future'
    36+
    path: ${{env.sample_code_java}}
    37+
    - name: Setup Java 1.8 to build the SDK
    38+
    uses: actions/setup-java@v2
    39+
    with:
    40+
    distribution: 'temurin'
    41+
    java-version: '8'
    42+
    - name: Build the Java SDK
    43+
    run: |
    44+
    mvn -version
    45+
    java -version
    46+
    cd $sdk_java
    47+
    mvn clean install
    48+
    - name: Replace the version of SDK in samples' pom file
    49+
    run: |
    50+
    cd $sdk_java
    51+
    SDK_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
    52+
    echo $SDK_VERSION
    53+
    cd ../$sample_code_java
    54+
    perl -i -spe "BEGIN{undef $/;} s|<groupId>net\.authorize<\/groupId>\s*<artifactId>anet-java-sdk<\/artifactId>\s*<version>.*?<\/version>|<groupId>net.authorize</groupId>\n <artifactId>anet-java-sdk</artifactId>\n <version>\${version}</version>|g" -- -version=$SDK_VERSION pom.xml
    55+
    cat pom.xml
    56+
    - name: Setup Java version to Build the samples
    57+
    uses: actions/setup-java@v2
    58+
    with:
    59+
    distribution: ${{matrix.distribution}}
    60+
    java-version: ${{matrix.java-version}}
    61+
    - name: Build the Sample Project and Run the Samples
    62+
    run: |
    63+
    mvn -version
    64+
    java -version
    65+
    66+
    cd $sdk_java
    67+
    SDK_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
    68+
    echo $SDK_VERSION
    69+
    70+
    cd ../$sample_code_java
    71+
    mvn install -DsdkVersion=$SDK_VERSION -DskipTests=true -Dmaven.javadoc.skip=true -B -V
    72+
    echo "Running Samples"
    73+
    mvn test -DsdkVersion=$SDK_VERSION -B

    .gitignore

    Lines changed: 2 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,8 +1,10 @@
    11
    target
    22
    logs
    3+
    log
    34

    45
    #intellij files
    56
    .idea
    67
    *.iml
    78
    .DS_Store
    89
    docs/.DS_Store
    10+
    *.xsd

    .project

    Lines changed: 0 additions & 23 deletions
    This file was deleted.

    build.xml

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -6,7 +6,7 @@
    66
    <property name="javadocs.dir" value="${basedir}/docs/javadocs" />
    77
    <property name="build.dir" value="${basedir}/target" />
    88
    <property name="classes.dir" value="${basedir}/target/classes" />
    9-
    <property name="lib.dir" value="${basedir}/lib" />
    9+
    <property name="lib.dir" value="${basedir}/target/lib" />
    1010
    <property name="src.tests" value="${basedir}/src/test/java" />
    1111
    <property name="resources.dir" value="${basedir}/resources" />
    1212
    <property name="reports.tests" value="${basedir}/target/reports" />
    @@ -106,7 +106,7 @@
    106106
    <javadoc destdir="${javadocs.dir}" author="true" version="true" encoding="UTF-8" use="true" windowtitle="Authorize.Net Java SDK" verbose="off" serialwarn="off">
    107107

    108108
    <classpath>
    109-
    <fileset id="libFiles" dir="lib">
    109+
    <fileset id="libFiles" dir="target/lib">
    110110
    <include name="**/**/*.jar" />
    111111
    </fileset>
    112112
    </classpath>

    lib/commons-logging-1.2.jar

    -60.4 KB
    Binary file not shown.

    lib/gson-2.3.1.jar

    -206 KB
    Binary file not shown.

    lib/hamcrest-core-1.3.jar

    -44 KB
    Binary file not shown.

    lib/hamcrest-library-1.3.jar

    -51.8 KB
    Binary file not shown.

    lib/httpclient-4.5.12.jar

    -760 KB
    Binary file not shown.

    0 commit comments

    Comments
     (0)
    0