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

Question re version 3.0.0 #62

Open
andye2004 opened this issue Jul 4, 2023 · 1 comment
Open

Question re version 3.0.0 #62

andye2004 opened this issue Jul 4, 2023 · 1 comment

Comments

@andye2004
Copy link

Can you tell me when the Vaadin 24 compatible version 3.0.0. will be available in maven central / vaadin add-on repos please?

@hoshie82
Copy link

Working solution for gradle to download the project in a separate subproject and import it with includeBuild

root project settings.gradle

includeBuild("ext/grid-layout") {
    dependencySubstitution {
        substitute module('com.github.appreciated:vaadin-css-grid') using project(':')
    }
}

grid-layout build.gradle

plugins {
    id 'java'
    id 'org.ajoberstar.grgit' version '5.2.1'
}

// import properties of root project gradle.properties
try {
    Properties props = new Properties()
    props.load(new FileInputStream("$rootDir/../../gradle.properties"))
    props.each { prop -> project.ext.setProperty(prop.key, prop.value) }
} catch (exception) {
    throw new InvalidUserDataException("Parameters not found : $exception.message")
}
repositories {
    mavenCentral()
    maven {
        url "https://vaadin.com/nexus/content/repositories/vaadin-addons/"
    }
}
// dependencies of pom.xml
dependencies {
    implementation "com.vaadin:vaadin:$vaadinVersion"
    implementation "com.vaadin:vaadin-core:$vaadinVersion"
    implementation "org.vaddon:mediaquery:5.0.3"
}

group "com.github.appreciated"
version "3.0.0"

def downloadDir = "$projectDir/build/tmp/"
def generatedClasses = file("$downloadDir/src/main/java")
def generatedResources = file("$downloadDir/src/main/resources")

tasks.register("downloadProject") {
    outputs.dirs downloadDir
    def folder = file(downloadDir)
    doFirst {
        assert folder.exists() || folder.mkdirs()
        grgit.clone(dir: folder, uri: 'https://github.com/appreciated/grid-layout.git')
    }
    onlyIf {
        !folder.exists()
    }
}

sourceSets.main.java.srcDirs += generatedClasses.absolutePath
sourceSets.main.resources.srcDirs += generatedResources.absolutePath
compileJava.dependsOn downloadProject

dependency can be used with

dependencies {
    implementation 'com.github.appreciated:vaadin-css-grid:3.0.0'
}

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

2 participants