Skip to content

Commit

Permalink
Add gradle build. Add publishing command to S3
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehor Kovalchuk committed Mar 21, 2023
1 parent 45e3f97 commit 9346285
Show file tree
Hide file tree
Showing 1,980 changed files with 166,790 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
permissions:
id-token: write
contents: read

jobs:
publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::499333472133:role/GitHub-Publish-Maven-Artifacts
aws-region: eu-east-1

- name: Publish to Lidalia Repo
uses: gradle/gradle-build-action@v2
with:
arguments: publishAllPublicationsToWiremock-cloud-publicRepository
Binary file added .gradle/8.0.2/checksums/checksums.lock
Binary file not shown.
Binary file added .gradle/8.0.2/checksums/md5-checksums.bin
Binary file not shown.
Binary file added .gradle/8.0.2/checksums/sha1-checksums.bin
Binary file not shown.
Binary file added .gradle/8.0.2/checksums/sha256-checksums.bin
Binary file not shown.
Binary file added .gradle/8.0.2/checksums/sha512-checksums.bin
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file added .gradle/8.0.2/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/8.0.2/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/8.0.2/fileHashes/fileHashes.lock
Binary file not shown.
Binary file added .gradle/8.0.2/fileHashes/resourceHashesCache.bin
Binary file not shown.
Empty file added .gradle/8.0.2/gc.properties
Empty file.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Mon Mar 20 14:28:39 TRT 2023
gradle.version=8.0.2
Binary file added .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file added .gradle/file-system.probe
Binary file not shown.
Empty file added .gradle/vcs-1/gc.properties
Empty file.
Binary file added buildSrc/.gradle/8.0.2/checksums/checksums.lock
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added buildSrc/.gradle/8.0.2/fileHashes/fileHashes.lock
Binary file not shown.
Empty file.
Binary file not shown.
2 changes: 2 additions & 0 deletions buildSrc/.gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Mon Mar 20 14:28:27 TRT 2023
gradle.version=8.0.2
Binary file not shown.
Binary file added buildSrc/.gradle/file-system.probe
Binary file not shown.
Binary file added buildSrc/.gradle/noVersion/buildSrc.lock
Binary file not shown.
Empty file.
15 changes: 15 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This project uses @Incubating APIs which are subject to change.
*/

plugins {
// Support convention plugins written in Groovy. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build.
id 'groovy-gradle-plugin'
}

repositories {
// Use the plugin portal to apply community plugins in convention plugins.
gradlePluginPortal()
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//CHECKSTYLE:OFF
import org.gradle.util.GradleVersion;
import org.gradle.groovy.scripts.BasicScript;
import org.gradle.groovy.scripts.ScriptSource;
import org.gradle.groovy.scripts.TextResourceScriptSource;
import org.gradle.internal.resource.StringTextResource;
/**
* Precompiled io.swagger.parser.v3.java-conventions script plugin.
**/
public class IoSwaggerParserV3JavaConventionsPlugin implements org.gradle.api.Plugin<org.gradle.api.internal.project.ProjectInternal> {
private static final String MIN_SUPPORTED_GRADLE_VERSION = "5.0";
public void apply(org.gradle.api.internal.project.ProjectInternal target) {
assertSupportedByCurrentGradleVersion();
try {
Class<? extends BasicScript> pluginsBlockClass = Class.forName("cp_precompiled_IoSwaggerParserV3JavaConventions").asSubclass(BasicScript.class);
BasicScript pluginsBlockScript = pluginsBlockClass.getDeclaredConstructor().newInstance();
pluginsBlockScript.setScriptSource(scriptSource(pluginsBlockClass));
pluginsBlockScript.init(target, target.getServices());
pluginsBlockScript.run();
target.getPluginManager().apply("java-library");
target.getPluginManager().apply("maven-publish");


Class<? extends BasicScript> precompiledScriptClass = Class.forName("precompiled_IoSwaggerParserV3JavaConventions").asSubclass(BasicScript.class);
BasicScript script = precompiledScriptClass.getDeclaredConstructor().newInstance();
script.setScriptSource(scriptSource(precompiledScriptClass));
script.init(target, target.getServices());
script.run();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private static ScriptSource scriptSource(Class<?> scriptClass) {
return new TextResourceScriptSource(new StringTextResource(scriptClass.getSimpleName(), ""));
}
private static void assertSupportedByCurrentGradleVersion() {
if (GradleVersion.current().getBaseVersion().compareTo(GradleVersion.version(MIN_SUPPORTED_GRADLE_VERSION)) < 0) {
throw new RuntimeException("Precompiled Groovy script plugins require Gradle "+MIN_SUPPORTED_GRADLE_VERSION+" or higher");
}
}
}
//CHECKSTYLE:ON
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added buildSrc/build/libs/buildSrc.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
implementation-class=IoSwaggerParserV3JavaConventionsPlugin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
implementation-class=IoSwaggerParserV3JavaConventionsPlugin
Binary file not shown.
2 changes: 2 additions & 0 deletions buildSrc/build/tmp/jar/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This project uses @Incubating APIs which are subject to change.
*/

plugins {
id 'java-library'
id 'maven-publish'
}

repositories {
mavenLocal()
maven {
url = uri('https://oss.sonatype.org/content/repositories/snapshots')
}

maven {
url = uri('https://oss.sonatype.org/content/repositories/releases')
}

maven {
url = uri('https://maven-public.wiremock.io')
}

maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}

group = 'io.swagger.parser.v3'
version = '2.1.13.1-SNAPSHOT'
java.sourceCompatibility = JavaVersion.VERSION_1_8

publishing {
repositories {
maven {
name = "wiremock-cloud-public"
url = "s3://wiremock-cloud-maven-public-repo/releases/"
credentials(AwsCredentials) {
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
}
}
}
}

java {
withSourcesJar()
}

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}

test {
jvmArgs '-Djdk.attach.allowAttachSelf=true'
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 9346285

Please sign in to comment.