-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
294 additions
and
273 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,110 @@ | ||
plugins { | ||
id("java") | ||
id("maven-publish") | ||
id("signing") | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
} | ||
} | ||
|
||
allprojects { | ||
apply { | ||
plugin("java") | ||
plugin("maven-publish") | ||
} | ||
apply(plugin = "maven-publish") | ||
|
||
java.sourceCompatibility = JavaVersion.VERSION_11 | ||
java.targetCompatibility = JavaVersion.VERSION_11 | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") } | ||
maven { url = uri("https://oss.sonatype.org/content/repositories/releases/") } | ||
} | ||
} | ||
|
||
var libProjects = mutableSetOf( project(":jParser:core"), | ||
project(":jParser:idl"), | ||
project(":jParser:loader"), | ||
project(":jParser:cpp"), | ||
project(":jParser:teavm")) | ||
|
||
configure(libProjects) { | ||
|
||
group = LibExt.groupId | ||
version = LibExt.libVersion | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
url = uri { | ||
val ver = project.version.toString() | ||
val isSnapshot = ver.toUpperCase().contains("SNAPSHOT") | ||
val repoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
val repoUrlSnapshot = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
if(isSnapshot) repoUrlSnapshot else repoUrl | ||
} | ||
credentials { | ||
username = System.getenv("USER") | ||
password = System.getenv("PASSWORD") | ||
} | ||
} | ||
} | ||
} | ||
|
||
// javadoc { | ||
// options.encoding = 'UTF-8' | ||
// options.addStringOption('Xdoclint:none', '-quiet') | ||
// } | ||
//// | ||
// java { | ||
// withJavadocJar() | ||
// withSourcesJar() | ||
// } | ||
|
||
publishing.publications.configureEach { | ||
if (this is MavenPublication) { | ||
pom { | ||
name = "jParser" | ||
description = "Java JNI code parser" | ||
url = "http://github.com/xpenatan/jParser" | ||
developers { | ||
developer { | ||
id = "Xpe" | ||
name = "Natan" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:git://github.com/xpenatan/jParser.git" | ||
developerConnection = "scm:git:ssh://github.com/xpenatan/jParser.git" | ||
url = "http://github.com/xpenatan/jParser/tree/master" | ||
} | ||
licenses { | ||
license { | ||
name = "The Apache License, Version 2.0" | ||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
val signingKey = System.getenv("SIGNING_KEY") | ||
val signingPassword = System.getenv("SIGNING_PASSWORD") | ||
if(signingKey != null && signingPassword != null) { | ||
signing { | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
publishing.publications.configureEach { | ||
sign(this) | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
object LibExt { | ||
val libVersion: String = this.getVersion() | ||
const val jniGenVersion = "2.3.1" | ||
const val javaparserVersion = "3.24.7" | ||
const val jUnitVersion = "4.12" | ||
const val groupId = "com.github.xpenatan.jParser" | ||
|
||
private fun getVersion(): String { | ||
var isRelease = System.getenv("RELEASE") | ||
var libVersion = "1.0.0-SNAPSHOT" | ||
if(isRelease != null && isRelease.toBoolean()) { | ||
libVersion = "1.0.0-b3" | ||
} | ||
System.out.println("jParser Version: " + libVersion) | ||
return libVersion | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,4 +1,2 @@ | ||
group = project.groupId | ||
|
||
dependencies { | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
plugins { | ||
id("java") | ||
} | ||
|
||
val mainClassName = "com.github.xpenatan.jparser.example.Main" | ||
|
||
dependencies { | ||
implementation(project(":example:example-base")) | ||
implementation(project(":jParser:core")) | ||
implementation(project(":jParser:idl")) | ||
implementation(project(":jParser:teavm")) | ||
implementation(project(":jParser:cpp")) | ||
} | ||
|
||
tasks.register<JavaExec>("generateNativeProject") { | ||
group = "gen" | ||
description = "Generate native project" | ||
mainClass.set(mainClassName) | ||
classpath = sourceSets["main"].runtimeClasspath | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
plugins { | ||
id("java") | ||
} | ||
|
||
dependencies { | ||
} | ||
|
||
tasks.named("clean") { | ||
doFirst { | ||
val srcPath = "$projectDir/src/main/" | ||
project.delete(files(srcPath)) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.