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

Compatibility with Intellij Gradle plugin #12

Closed
haulmont-git opened this Issue Oct 26, 2016 · 0 comments

Comments

@haulmont-git
Copy link

haulmont-git commented Oct 26, 2016

Try to get rid of enchanced-classes directory and replace classes in /classes directory right after compileJava task in an additional doLast action


Original issue: https://youtrack.cuba-platform.com/issue/PL-8093


Updates

Now CUBA-based projects can be imported as Gradle projects into Intellij IDEA. It allows you to perform all tasks via default Intellij IDEA Gradle plugin.

Also, all tests that use entities can be launched from Intellij IDEA UI.

  1. Old tasks CubaEnhancing, CubaTestEnhancing, CubaEnhancingTask are now empty and marked as @Deprecated. An additional message is printed to the execution log.

  2. Enhancing is now performed by CubaEnhancingAction that is added as doLast action for the compileJava and compileTestJava tasks.

  3. Deprecated property String metadataXml is removed and no longer supported.

  4. Enhancing is now configured with DSL for each module. Example:

configure(coreModule) {
    ...
    entitiesEnhancing {
        main {
            enabled = true
            persistenceConfig = 'custom-persistence.xml'
        }
        test {
            enabled = true
            persistenceConfig = 'test-persistence.xml'
        }
    }
}

Migration Guide

Old version:

task enhance(type: CubaEnhancing) {
    persistenceConfig = 'custom-persistence.xml'
}

task testEnhance(type: CubaTestEnhancing) {
    persistenceConfig = 'test-persistence.xml'
}

New version:

entitiesEnhancing {
    main {
        enabled = true
        persistenceConfig = 'custom-persistence.xml'
    }
    test {
        enabled = true
        persistenceConfig = 'test-persistence.xml'
    }
}

Notes

The following setting should be enabled in Intellij IDEA: Build, Execution, Deployment -> Build Tools -> Gradle -> Runner -> Delegate IDE build/run actions to gradle.

Check this post: Gradle Goodness: Delegate Build And Run Actions To Gradle In IntelliJ IDEA.

JetBrains/gradle-idea-ext-plugin doesn't allow to turn this setting on.

@haulmont-git haulmont-git added this to the Release 7.0 milestone Apr 27, 2018

dtsaryov added a commit that referenced this issue Apr 27, 2018

dtsaryov added a commit that referenced this issue May 3, 2018

dtsaryov added a commit that referenced this issue May 4, 2018

dtsaryov added a commit that referenced this issue May 11, 2018

dtsaryov added a commit that referenced this issue May 11, 2018

dtsaryov added a commit that referenced this issue May 14, 2018

dtsaryov added a commit that referenced this issue May 14, 2018

dtsaryov added a commit that referenced this issue May 22, 2018

dtsaryov added a commit that referenced this issue May 23, 2018

dtsaryov added a commit that referenced this issue May 23, 2018

dtsaryov added a commit that referenced this issue Jun 4, 2018

dtsaryov added a commit that referenced this issue Jun 5, 2018

dtsaryov added a commit that referenced this issue Jun 5, 2018

@jreznot jreznot closed this Jun 5, 2018

@jreznot jreznot reopened this Aug 1, 2018

@natfirst natfirst assigned natfirst and unassigned IskandarovRost Oct 2, 2018

@natfirst natfirst closed this Oct 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment