Skip to content

Commit

Permalink
Setup Gradle from base folder
Browse files Browse the repository at this point in the history
 - less duplication of gradle
 - allow projects to be built depending on each other
  • Loading branch information
dries committed Sep 18, 2019
1 parent 8a1ff83 commit 6343bbe
Show file tree
Hide file tree
Showing 24 changed files with 61 additions and 898 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
**/.settings/
**/bin/

#Intellij
*.iml
.idea

#Gradle
**/.gradle/
**/build/*
**/build/*

#macOS
.DS_Store
39 changes: 39 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
buildscript {
repositories {
maven {
credentials {
username "$slimsApiArtifactoryUser"
password "$slimsApiArtifactoryPassword"
}
url "$slimsApiArtifactoryRepository"
}
}
dependencies {
classpath 'com.genohm:slims-plugin:0.1.0'
}
}

subprojects {
repositories {
maven {
credentials {
username "$slimsApiArtifactoryUser"
password "$slimsApiArtifactoryPassword"
}
url "$slimsApiArtifactoryRepository"
}
}
apply plugin: 'idea'
apply plugin: 'eclipse'
if (file('src/main/resources/plugin.properties').exists()) {
println("Applying slimsplugin to project $it.name")
apply plugin: 'com.genohm.slimsplugin'
}
idea {
module {
if (scopes.COMPILE) {
scopes.COMPILE.plus += [configurations.provided]
}
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include 'templates:slimsgate-template'
include 'templates:slims-vaadin-template'
include 'templates:library-template'
include 'templates:dto-template'
22 changes: 10 additions & 12 deletions templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@

There are some empty template projects listed here. They provide you with an empty project where the minimal required files are present. The following templates are present

- slimsgate-template
An empty slimsgate plugin. SLIMSGATE plugins are used to connect to machines and external systems. They also can implement extra business logic required for your lab.
* slimsgate-template: An empty slimsgate plugin. SLIMSGATE plugins are used to connect to machines and external systems. They also can implement extra business logic required for your lab.

- slims-vaadin-template
An empty slims vaadin plugin. Slims vaadin plugins are used to create custom UIs and external portals for SLIMS.
* slims-vaadin-template: An empty slims vaadin plugin. Slims vaadin plugins are used to create custom UIs and external portals for SLIMS.

- dto-template
An empty DTO project. Can be used to put DTO objects in to transfer in between SLIMS and SLIMS GATE
* dto-template: An empty DTO project. Can be used to put DTO objects in to transfer in between SLIMS and SLIMS GATE

- library-template
An empty library project. Can be used to put common code into.
* library-template: An empty library project. Can be used to put common code into.

## Prerequisites.

Expand All @@ -37,16 +33,18 @@ You will need to place this file in

## Using gradle

Once you are setup download any of these projects to try and create a dummy project. We suggest starting with slimsgate-template.
Once you are setup, download this repository and try to create a dummy project. We suggest starting with slimsgate-template.

Navigate to the plugin folder with the command line interface you use. We suggest using GIT Bash for Windows. You can test out if you can build your plugin with
Navigate to the base folder of the repository with the command line interface you use. We suggest using GIT Bash for Windows. You can test out if you can build your plugin with

```
./gradlew fatjar
./gradlew templates:slimsgate-template:fatjar
```

You can upload and deploy your plugin with

```
./gradlew uploadToSlims
./gradlew templates:slimsgate-template:uploadToSlims
```

Make sure that new defined projects are included in [settings.gradle](../settings.gradle).
26 changes: 0 additions & 26 deletions templates/dto-template/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +0,0 @@
buildscript {
repositories {
maven {
credentials {
username "$slimsApiArtifactoryUser"
password "$slimsApiArtifactoryPassword"
}
url "$slimsApiArtifactoryRepository"
}
}
dependencies {
classpath 'com.genohm:slims-plugin:0.1.0'
}
}

repositories {
maven {
credentials {
username "$slimsApiArtifactoryUser"
password "$slimsApiArtifactoryPassword"
}
url "$slimsApiArtifactoryRepository"
}
}

apply plugin: 'com.genohm.slimsplugin'
26 changes: 0 additions & 26 deletions templates/library-template/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +0,0 @@
buildscript {
repositories {
maven {
credentials {
username "$slimsApiArtifactoryUser"
password "$slimsApiArtifactoryPassword"
}
url "$slimsApiArtifactoryRepository"
}
}
dependencies {
classpath 'com.genohm:slims-plugin:0.1.0'
}
}

repositories {
maven {
credentials {
username "$slimsApiArtifactoryUser"
password "$slimsApiArtifactoryPassword"
}
url "$slimsApiArtifactoryRepository"
}
}

apply plugin: 'com.genohm.slimsplugin'
Binary file not shown.

This file was deleted.

164 changes: 0 additions & 164 deletions templates/library-template/gradlew

This file was deleted.

Loading

0 comments on commit 6343bbe

Please sign in to comment.