Static CDN SDK

Software Development Kits to work with staticcdn.io. It provide java client/maven plugin/gradle plugin.

License

License

GroupId

GroupId

io.staticcdn.sdk
ArtifactId

ArtifactId

staticcdn-sdk
Last Version

Last Version

0.1.26
Release Date

Release Date

Type

Type

pom
Description

Description

Static CDN SDK
Software Development Kits to work with staticcdn.io. It provide java client/maven plugin/gradle plugin.
Source Code Management

Source Code Management

https://github.com/mrduguo/staticcdn-sdk

Download staticcdn-sdk

Filename Size
staticcdn-sdk-0.1.26.pom 2 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/io.staticcdn.sdk/staticcdn-sdk/ -->
<dependency>
    <groupId>io.staticcdn.sdk</groupId>
    <artifactId>staticcdn-sdk</artifactId>
    <version>0.1.26</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/io.staticcdn.sdk/staticcdn-sdk/
implementation 'io.staticcdn.sdk:staticcdn-sdk:0.1.26'
// https://jarcasting.com/artifacts/io.staticcdn.sdk/staticcdn-sdk/
implementation ("io.staticcdn.sdk:staticcdn-sdk:0.1.26")
'io.staticcdn.sdk:staticcdn-sdk:pom:0.1.26'
<dependency org="io.staticcdn.sdk" name="staticcdn-sdk" rev="0.1.26">
  <artifact name="staticcdn-sdk" type="pom" />
</dependency>
@Grapes(
@Grab(group='io.staticcdn.sdk', module='staticcdn-sdk', version='0.1.26')
)
libraryDependencies += "io.staticcdn.sdk" % "staticcdn-sdk" % "0.1.26"
[io.staticcdn.sdk/staticcdn-sdk "0.1.26"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • client
  • maven
  • gradle
  • standalone

Static CDN SDK

Documentation

Maven Sample

<plugin>
    <groupId>io.staticcdn.sdk</groupId>
    <artifactId>staticcdn-sdk-maven-plugin</artifactId>
    <version>0.1.26</version>
    <executions>
        <execution>
            <goals>
                <goal>optimize</goal>
            </goals>
            <configuration>
                <apiKey>***</apiKey>
                <apiSecret>***</apiSecret>
                <inputWwwRoots>
                    <inputWwwRoot>${project.basedir}/target/generated-resource</inputWwwRoot>
                    <inputWwwRoot>${project.basedir}</inputWwwRoot>
                </inputWwwRoots>
                <outputWwwRoot>${project.basedir}/target/classes</outputWwwRoot>
                <inputFilePathPatterns>
                    <inputFilePathPattern>/static/include/css/.*inc</inputFilePathPattern>
                    <inputFilePathPattern>/static/include/js/.*inc</inputFilePathPattern>
                </inputFilePathPatterns>
            </configuration>
        </execution>
    </executions>
</plugin>

Gradle Sample

buildscript {
    dependencies {
        classpath 'io.staticcdn.sdk:staticcdn-sdk-gradle-plugin:0.1.26'
    }
}
apply plugin: 'groovy'
apply plugin: 'statico'
statico {
    apiKey='***'
    apiSecret='***'
    inputWwwRoots=['wwwroot/']
    outputWwwRoot='build/optimized-wwwroot'
    inputFilePathPatterns=[
            '^.*html$',
    ]
    optimizerOptions=[
            autoEmbedCss:true,
            autoDataUrlMaxFileSize:1000
    ]
}

SDK Build Commands

(cd /opt/staticcdn/src/staticcdn-sdk && mvn clean install)

export MAVEN_OPTS="-Dhttps.protocols=SSLv3 -Dforce.http.jre.executor=true"
(cd /opt/staticcdn/src/staticcdn-sdk && mvn release:clean && mvn release:prepare && mvn release:perform)

Versions

Version
0.1.26
0.1.23
0.1.22
0.1.21
0.1.17
0.1.16
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.9
0.1.8
0.1.7
0.1.5
0.1.3
0.1.2