forked from fge/msg-simple
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update gradle settings, add lint, fix groupid.
- Loading branch information
Showing
6 changed files
with
128 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,8 @@ apply(plugin: "eclipse"); | |
|
||
apply(from: "project.gradle"); | ||
|
||
group = "com.github.java-json-tools"; | ||
|
||
/* | ||
* Repositories to use | ||
*/ | ||
|
@@ -79,6 +81,17 @@ task sourcesJar(type: Jar, dependsOn: classes) { | |
from sourceSets.main.allSource; | ||
} | ||
|
||
/* | ||
* Lint all the things! | ||
*/ | ||
allprojects { | ||
gradle.projectsEvaluated { | ||
tasks.withType(JavaCompile) { | ||
options.compilerArgs << "-Xlint:all" | ||
} | ||
} | ||
} | ||
|
||
/* | ||
* Javadoc: we need to tell where the overview.html is, it will not pick it up | ||
* automatically... | ||
|
@@ -99,39 +112,43 @@ artifacts { | |
archives javadocJar; | ||
} | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = "1.11"; | ||
wrapper { | ||
gradleVersion = "5.6.2"; | ||
distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"; | ||
} | ||
|
||
task pom << { | ||
pom {}.writeTo("${projectDir}/pom.xml"); | ||
task pom { | ||
doLast { | ||
pom {}.writeTo("${projectDir}/pom.xml"); | ||
} | ||
} | ||
|
||
/* | ||
* SIGNING | ||
*/ | ||
|
||
project.ext { | ||
gitrwscm = sprintf("[email protected]:fge/%s", name); | ||
gitroscm = sprintf("https://github.com/fge/%s.git", name); | ||
projectURL = sprintf("https://github.com/fge/%s", name); | ||
description = "A lightweight, UTF-8 capable, printf() capable alternative to Java's ResourceBundle"; | ||
scmUrl = sprintf("git@github.com:java-json-tools/%s.git", name) | ||
projectURL = sprintf("https://github.com/java-json-tools/%s", name); | ||
sonatypeStaging = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"; | ||
sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots/"; | ||
}; | ||
|
||
task checkSigningRequirements << { | ||
def requiredProperties = [ "sonatypeUsername", "sonatypePassword" ]; | ||
def noDice = false; | ||
requiredProperties.each { | ||
if (project.properties[it] == null) { | ||
noDice = true; | ||
System.err.printf("property \"%s\" is not defined!") | ||
task checkSigningRequirements { | ||
doLast { | ||
def requiredProperties = [ "sonatypeUsername", "sonatypePassword" ]; | ||
def noDice = false; | ||
requiredProperties.each { | ||
if (project.properties[it] == null) { | ||
noDice = true; | ||
System.err.printf("property \"%s\" is not defined!") | ||
} | ||
} | ||
if (noDice) | ||
throw new IllegalStateException("missing required properties for " + | ||
"upload"); | ||
} | ||
if (noDice) | ||
throw new IllegalStateException("missing required properties for " + | ||
"upload"); | ||
} | ||
|
||
uploadArchives { | ||
|
@@ -167,15 +184,15 @@ uploadArchives { | |
uploadArchives.repositories.mavenDeployer | ||
]*.pom*.whenConfigured { pom -> | ||
pom.project { | ||
name "${name}"; | ||
name "${project.name}"; | ||
packaging "jar"; | ||
description "${description}"; | ||
description "${project.ext.description}"; | ||
url "${projectURL}"; | ||
|
||
scm { | ||
url "${gitrwscm}"; | ||
connection "${gitrwscm}"; | ||
developerConnection "${gitroscm}"; | ||
url "${scmUrl}"; | ||
connection "${scmUrl}"; | ||
developerConnection "scm:git:${scmUrl}"; | ||
} | ||
|
||
licenses { | ||
|
@@ -193,9 +210,9 @@ uploadArchives { | |
|
||
developers { | ||
developer { | ||
id "fge"; | ||
name "Francis Galiegue"; | ||
email "fgaliegue@gmail.com"; | ||
id "huggsboson"; | ||
name "John Huffaker"; | ||
email "jhuffaker+java-json-tools@gmail.com"; | ||
} | ||
} | ||
} | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,5 @@ | ||
# | ||
# Copyright (c) 2014, Francis Galiegue ([email protected]) | ||
# | ||
# This software is dual-licensed under: | ||
# | ||
# - the Lesser General Public License (LGPL) version 3.0 or, at your option, any | ||
# later version; | ||
# - the Apache Software License (ASL) version 2.0. | ||
# | ||
# The text of this file and of both licenses is available at the root of this | ||
# project or, if you have the jar distribution, in directory META-INF/, under | ||
# the names LGPL-3.0.txt and ASL-2.0.txt respectively. | ||
# | ||
# Direct link to the sources: | ||
# | ||
# - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt | ||
# - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt | ||
# | ||
|
||
#Sat Apr 12 21:17:48 CEST 2014 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=http\://services.gradle.org/distributions/gradle-5.6.2-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters