Skip to content

Commit 4131449

Browse files
committed
New project structure
1 parent cadb856 commit 4131449

File tree

79 files changed

+271
-197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+271
-197
lines changed

.gitignore

+2-9
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,5 @@ out
77
**/target
88
**/*.log
99
build
10-
node_modules
11-
src/main/resources/static/fonts
12-
src/main/resources/static/globalcss
13-
src/main/resources/static/globalscss
14-
src/main/resources/static/globaljs
15-
src/main/resources/static/img
16-
src/main/resources/views/preview/globalcss.ftl
17-
src/main/resources/views/preview/globaljs.ftl
18-
src/main/resources/static/css
10+
classes
11+

build.gradle

+53-152
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
}
5+
dependencies {
6+
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.9.RELEASE")
7+
}
8+
}
9+
110
plugins {
211
id 'net.researchgate.release' version '2.4.0'
3-
id 'com.github.johnrengelman.shadow' version '1.2.3'
412
id 'io.codearte.nexus-staging' version '0.9.0'
13+
id 'org.springframework.boot' version '1.5.9.RELEASE'
514
}
615

7-
apply plugin: 'maven'
816
apply plugin: 'java'
9-
apply plugin: 'idea'
10-
apply plugin: 'application'
11-
apply plugin: 'project-report'
12-
apply plugin: 'signing'
13-
14-
nexusStaging {
15-
username=sonatypeUsername
16-
password=sonatypePassword
17-
packageGroup='de.otto'
18-
}
19-
20-
static version() {
21-
return '2.3.6-SNAPSHOT'
22-
}
23-
24-
static isReleaseBuild() {
25-
return !version().contains("SNAPSHOT")
26-
}
27-
28-
ext.pomVersion = version()
29-
30-
mainClassName = 'de.otto.jlineup.Main'
3117

3218
repositories {
3319
mavenCentral()
@@ -36,152 +22,67 @@ repositories {
3622
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
3723
}
3824

39-
dependencies {
40-
compile("org.seleniumhq.selenium:selenium-java:3.7.0") {
41-
exclude module: "selenium-edge-driver"
42-
exclude module: "selenium-ie-driver"
43-
exclude module: "selenium-opera-driver"
44-
exclude module: "selenium-safari-driver"
45-
exclude module: "htmlunit"
46-
}
47-
compile "io.github.bonigarcia:webdrivermanager:2.0.1"
48-
compile "com.codeborne:phantomjsdriver:1.4.3"
49-
compile "com.beust:jcommander:1.72"
50-
compile "com.google.code.gson:gson:2.8.2"
51-
compile "ch.qos.logback:logback-classic:1.2.3"
52-
compile "org.thymeleaf:thymeleaf:3.0.8.RELEASE"
53-
testCompile "junit:junit:4.12"
54-
testCompile "org.mockito:mockito-core:2.11.0"
55-
testCompile "org.hamcrest:hamcrest-core:1.3"
56-
testCompile "org.hamcrest:hamcrest-library:1.3"
57-
testCompile "com.github.stefanbirkner:system-rules:1.16.1"
58-
}
59-
60-
test {
61-
testLogging {
62-
exceptionFormat = 'full'
63-
showStandardStreams = true
64-
}
65-
}
66-
67-
/*
68-
manifest {
69-
attributes 'Implementation-Title': 'JLineup', 'Implementation-Version': version()
70-
}
71-
*/
25+
apply plugin: 'io.codearte.nexus-staging'
7226

73-
shadowJar {
74-
baseName = 'jlineup'
75-
classifier = null
76-
version = null
27+
nexusStaging {
28+
username = sonatypeUsername
29+
password = sonatypePassword
30+
packageGroup = 'de.otto'
7731
}
7832

79-
idea.project {
80-
jdkName = "1.8"
81-
languageLevel = "1.8"
82-
ipr.withXml { provider ->
83-
provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
33+
apply plugin: 'idea'
34+
idea {
35+
project {
36+
languageLevel = '1.8'
37+
ipr.withXml { provider ->
38+
provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
39+
}
8440
}
8541
}
8642

87-
task javadocJar(type: Jar, dependsOn: javadoc) {
88-
classifier = 'javadoc'
89-
from 'build/docs/javadoc'
90-
}
91-
92-
task sourcesJar(type: Jar) {
93-
from sourceSets.main.allSource
94-
classifier = 'sources'
95-
}
43+
subprojects {
9644

97-
artifacts {
98-
archives sourcesJar
99-
archives javadocJar
100-
archives shadowJar
101-
}
45+
version = '2.4.0-SNAPSHOT'
46+
group = 'de.otto'
10247

103-
[distZip, distTar].each { task -> configurations.archives.artifacts.removeAll
104-
{ it.class.simpleName == "ArchivePublishArtifact" && it.archiveTask == task }
105-
task.enabled = false
106-
}
107-
108-
signing {
109-
required { isReleaseBuild() && gradle.taskGraph.hasTask('uploadArchives') }
110-
sign configurations.archives
111-
}
112-
113-
tasks.processResources << {
114-
def resourcesDir = project.sourceSets.main.output.resourcesDir
115-
resourcesDir.mkdirs()
116-
117-
def versionProperties = new File(resourcesDir, "version.properties")
118-
if (versionProperties) {
119-
def gitVersion = runCommand("git log -n1 --format=format:%H")
120-
def fullVersion = version()
121-
versionProperties.text = "\njlineup.commit = ${gitVersion}" + "\njlineup.version = ${fullVersion}"
122-
}
123-
}
124-
125-
uploadArchives {
126-
configuration = configurations.archives
12748
repositories {
128-
mavenDeployer {
129-
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
130-
131-
// use this for local upload debugging instead of sonatype
132-
// repository(url: "file://${buildDir}/repo")
133-
134-
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
135-
authentication(userName: sonatypeUsername, password: sonatypePassword)
136-
}
137-
138-
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
139-
authentication(userName: sonatypeUsername, password: sonatypePassword)
140-
}
49+
mavenCentral()
50+
mavenLocal()
51+
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
52+
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
53+
}
14154

142-
pom.groupId = 'de.otto'
143-
pom.artifactId = 'jlineup'
144-
pom.version = version()
55+
apply plugin: 'java'
56+
apply plugin: 'application'
57+
apply plugin: 'project-report'
58+
apply plugin: 'signing'
59+
apply plugin: 'idea'
60+
apply plugin: 'maven'
14561

146-
pom.project {
147-
name 'JLineup'
148-
packaging 'jar'
149-
description 'Webapp image comparison tool'
150-
url 'http://github.com/otto-de/jlineup'
15162

152-
scm {
153-
url 'scm:[email protected]:otto-de/jlineup.git'
154-
connection 'scm:[email protected]:otto-de/jlineup.git'
155-
}
63+
jar {
64+
manifest.attributes provider: 'gradle'
65+
}
15666

157-
licenses {
158-
license {
159-
name 'The Apache Software License, Version 2.0'
160-
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
67+
idea {
68+
module {
69+
iml {
70+
withXml {
71+
def moduleRoot = it.asNode()
72+
def facetManager = moduleRoot.component.find { component -> component.'@name' == 'FacetManager' }
73+
if (!facetManager) {
74+
facetManager = moduleRoot.appendNode('component', [name: 'FacetManager'])
16175
}
162-
}
16376

164-
developers {
165-
developer {
166-
id 'mgeweke'
167-
name 'Marco Geweke'
168-
url 'https://github.com/MediaMarco'
77+
def springFacet = facetManager.facet.find { facet -> facet.'@type' == 'Spring' && facet.'@name' == 'Spring' }
78+
if (!springFacet) {
79+
springFacet = facetManager.appendNode('facet', [type: 'Spring', name: 'Spring'])
80+
springFacet.appendNode('configuration')
16981
}
17082
}
17183
}
17284
}
17385
}
174-
}
17586

176-
static String runCommand(command) {
177-
Process proc = command.execute()
178-
def out = new StringBuffer()
179-
proc.consumeProcessOutputStream(out)
180-
proc.consumeProcessErrorStream(out)
181-
proc.waitFor()
182-
def errorlevel = proc.exitValue()
183-
if (errorlevel != 0) {
184-
throw new RuntimeException("exec failed on command: '${command}' with errorlevel ${errorlevel}".toString())
185-
}
186-
out.toString().trim()
187-
}
87+
88+
}

0 commit comments

Comments
 (0)