Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to deploy to S3 #10

Open
Saandji opened this issue May 5, 2018 · 1 comment
Open

Trying to deploy to S3 #10

Saandji opened this issue May 5, 2018 · 1 comment

Comments

@Saandji
Copy link

Saandji commented May 5, 2018

Hi!

I'm trying to deploy my TornadoFX application to S3, but when I include

task deployS3(type: Exec) {
    // You need to have installed AWS command line interface: https://aws.amazon.com/cli/
    commandLine 'aws', 'configure', 'set', 'aws_access_key_id', 'your_access_key_id'
    commandLine 'aws', 'configure', 'set', 'aws_secret_access_key', 'your_secret_access_key'
    commandLine 'aws', 's3', 'cp', 'build/libs', appDeployTarget, '--acl', 'public-read', '--recursive', '--region', 'us-west-1'
}

and run gradle build or any gradle task, I'm getting next error:

> Could not get unknown property 'appDeployTarget' for task ':deployS3' of type org.gradle.api.tasks.Exec.

Do I miss anything?

here's my gradle file:

apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: 'java'
apply plugin: 'no.tornado.fxlauncher'

group = 'no.tornado.fxsample'
version = '1.0'

description = """"""

sourceCompatibility = 1.8
targetCompatibility = 1.8

buildscript {
    ext.kotlin_version = '1.2.41'

    repositories {
        jcenter()
        mavenCentral()
    }

    dependencies {
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.41'
        classpath 'no.tornado:fxlauncher-gradle-plugin:1.0.16'
    }
}

mainClassName = 'no.tornadofx.fxsamples.withfxproperties.SkillsEditorApp'

repositories {
    maven { url "http://repo.maven.apache.org/maven2" }
    mavenCentral()
    mavenLocal()
    maven { url 'http://dl.bintray.com/kotlin/kotlin-eap' }
    maven { url "https://dl.bintray.com/kotlin/kotlinx" }
    maven { url "https://dl.bintray.com/kotlin/ktor" }
    maven { url "https://dl.bintray.com/sargunster/maven" }
    maven { url "https://dl.bintray.com/kotlin/squash" }
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}

dependencies {
    compile group: 'no.tornado', name: 'fxlauncher', version: '1.0.16'
    compile group: 'de.jensd', name: 'fontawesomefx', version: '8.9'
    compile group: 'com.amazonaws', name: 'aws-java-sdk-dynamodb', version: '1.11.213'
    compile group: 'no.tornado', name: 'tornadofx', version: '1.7.15'
}

compileKotlin {
    kotlinOptions.apiVersion = "1.2"
    kotlinOptions.languageVersion = "1.2"
    kotlinOptions.jvmTarget = "1.8"
}

fxlauncher {
    applicationVendor 'Alexa DJ'
    applicationUrl 'myUrl'
    applicationMainClass 'no.tornadofx.fxsamples.withfxproperties.SkillsEditorApp'
    acceptDowngrade false
    deployTarget 's3://my-bucket'
}

task deployS3(type: Exec) {
    // You need to have installed AWS command line interface: https://aws.amazon.com/cli/
    commandLine 'aws', 'configure', 'set', 'aws_access_key_id', 'access_key'
    commandLine 'aws', 'configure', 'set', 'aws_secret_access_key', 'secret_key'
    commandLine 'aws', 's3', 'cp', 'build/libs', appDeployTarget, '--acl', 'public-read', '--recursive', '--region', 'us-west-1'
}
@Saandji
Copy link
Author

Saandji commented May 5, 2018

found the way, had to create this variable to make it work:

def appDeployTarget = 's3://my-bucket'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant