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

Fixes field with same name under same domain conflict #48

Closed
wants to merge 3 commits into from
Closed
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
20 changes: 20 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Gradle build and deploy to github maven package.

# Gradle build.

name: Java Build

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Gradle
run: ./gradlew build test
26 changes: 26 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# publish-release.yml
# https://medium.com/@shanemyrick/publishing-to-github-packages-with-gradle-and-github-actions-4ad842634c4e

name: Publish release

on: [push]

jobs:
publish-release:
runs-on: ubuntu-latest

steps:
- name: Checkout latest code
uses: actions/checkout@v1

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Publish artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

run: |
./gradlew publish
23 changes: 22 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
id "de.undercouch.download" version "3.2.0"
}

version "3.0.0.BUILD-SNAPSHOT"
version "3.0.1.BUILD-SNAPSHOT"
group "org.grails.plugins"

apply plugin: 'eclipse'
Expand Down Expand Up @@ -155,6 +155,27 @@ bootRun {
// enable if you wish to package this plugin as a standalone application
bootJar.enabled = false


publishing {

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/muyantech/elasticsearch-grails-plugin")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}

publications {
gpr(MavenPublication) {
from(components.java)
}
}
}

apply from: "gradle/documentation.gradle"

apply from: "gradle/publish.gradle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class SearchableClassMapping implements ElasticSearchConfigAware {
}

String calculateIndexName() {
String name = (esConfig?.get('index') as ConfigObject)?.name ?: domainClass.packageName
String name = (esConfig?.get('index') as ConfigObject)?.name ?: domainClass.getClass().getName()

if (name == null || name.length() == 0) {
name = domainClass.defaultPropertyName
Expand Down