Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gradle-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '21'
distribution: 'adopt-openj9'

- name: Set up Git
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '21'
distribution: 'adopt-openj9'

- name: Grant execute permission for gradlew
Expand Down
16 changes: 15 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import org.apache.tools.ant.filters.ReplaceTokens
import groovy.xml.XmlParser

String pluginName = "IBM-MQ-zOS-UCD"

Expand Down Expand Up @@ -46,6 +47,10 @@ dependencies {
testImplementation 'org.hamcrest:hamcrest-core:1.3'
}

configurations {
compileClasspath.extendsFrom implementation
}

sourceSets {
main {
groovy {
Expand Down Expand Up @@ -136,7 +141,7 @@ tasks.register('gatherI18n', JavaExec) {
delete buildLocaleDir
mkdir buildLocaleDir

main = 'i18n-scraper'
mainClass.set('i18n-scraper')
args 'build/locale/en.properties'
classpath = sourceSets.main.runtimeClasspath
}
Expand All @@ -145,6 +150,15 @@ tasks.register('cleanAll') {
dependsOn('clean', 'cleanCopyDeps', 'cleanDistPlugin', 'cleanGatherI18n')
}

//extractGPU and copyi18n uses same lib so to ensure both waits for copyDeps
tasks.named("extractGPU") {
dependsOn("copyDeps")
}

tasks.named("copyi18n") {
dependsOn("copyDeps")
}

static String stripVersion(fileNameWithVersion) {
String ext = fileNameWithVersion.substring(fileNameWithVersion.lastIndexOf("."), fileNameWithVersion.length())
int end = fileNameWithVersion.lastIndexOf("-")
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
57 changes: 37 additions & 20 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 23 additions & 18 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/**
* © Copyright IBM Corporation 2016, 2023.
* This is licensed under the following license.
* The Eclipse Public 1.0 License (http://www.eclipse.org/legal/epl-v10.html)
* U.S. Government Users Restricted Rights: Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/
package com.urbancode.air.plugin.helpers

public class NewAirPluginTool {

//**************************************************************************
// CLASS
//**************************************************************************

//**************************************************************************
// INSTANCE
//**************************************************************************

final public def isWindows = (System.getProperty('os.name') =~ /(?i)windows/).find()

def out = System.out;
def err = System.err;

private def inPropsFile;
private def outPropsFile;

def outProps;

public NewAirPluginTool(def inFile, def outFile){
inPropsFile = inFile;
outPropsFile = outFile;
outProps = new Properties();
}

public Properties getStepProperties() {
def props = new Properties();
def inputPropsFile = this.inPropsFile;
def inputPropsStream = null;
try {
inputPropsStream = new FileInputStream(inputPropsFile);
props.load(inputPropsStream);
}
catch (IOException e) {
throw new RuntimeException(e);
}
finally {
inputPropsStream.close();
}
return props;
}

public void setOutputProperty(String name, String value) {
this.outProps.setProperty(name, value);
}

public void setOutputProperties() {
OutputStream outputPropsStream = null;
try {
outputPropsStream = new FileOutputStream(this.outPropsFile);
outProps.store(outputPropsStream, "");
}
finally {
if (outputPropsStream != null) {
outputPropsStream.close();
}
}
}

public String getAuthToken() {
String authToken = System.getenv("AUTH_TOKEN");
return "{\"token\" : \"" + authToken + "\"}";
}

public String getAuthTokenUsername() {
return "PasswordIsAuthToken";
}

public void storeOutputProperties() {
setOutputProperties();
}
}
Loading