mirror of
https://github.com/fluencelabs/asmble
synced 2025-04-24 14:22:20 +00:00
Maven publishing support. Fixes #15
This commit is contained in:
parent
dd33676e50
commit
96458bdec7
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017 Chad Retz
|
Copyright (c) 2018 Chad Retz
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
87
build.gradle
87
build.gradle
@ -19,12 +19,24 @@ buildscript {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
group 'com.github.cretz.asmble'
|
||||||
|
version '0.4.0-SNAPSHOT'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
project(':annotations') {
|
||||||
|
javadoc {
|
||||||
|
options.links 'https://docs.oracle.com/javase/8/docs/api/'
|
||||||
|
// TODO: change when https://github.com/gradle/gradle/issues/2354 is fixed
|
||||||
|
options.addStringOption 'Xdoclint:all', '-Xdoclint:-missing'
|
||||||
|
}
|
||||||
|
|
||||||
|
publishSettings(project, 'asmble-annotations', 'Asmble WASM Annotations', true)
|
||||||
|
}
|
||||||
|
|
||||||
project(':compiler') {
|
project(':compiler') {
|
||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
apply plugin: 'application'
|
apply plugin: 'application'
|
||||||
@ -45,6 +57,8 @@ project(':compiler') {
|
|||||||
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
|
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
|
||||||
testCompile "org.ow2.asm:asm-debug-all:$asm_version"
|
testCompile "org.ow2.asm:asm-debug-all:$asm_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishSettings(project, 'asmble-compiler', 'Asmble WASM Compiler', false)
|
||||||
}
|
}
|
||||||
|
|
||||||
project(':examples') {
|
project(':examples') {
|
||||||
@ -191,4 +205,77 @@ project(':examples:rust-string') {
|
|||||||
dependsOn compileRustWasm
|
dependsOn compileRustWasm
|
||||||
}
|
}
|
||||||
mainClassName = 'asmble.examples.ruststring.Main'
|
mainClassName = 'asmble.examples.ruststring.Main'
|
||||||
|
}
|
||||||
|
|
||||||
|
def publishSettings(project, projectName, projectDescription, includeJavadoc) {
|
||||||
|
project.with {
|
||||||
|
if (!project.hasProperty('ossrhUsername')) return
|
||||||
|
apply plugin: 'maven'
|
||||||
|
apply plugin: 'signing'
|
||||||
|
|
||||||
|
archivesBaseName = projectName
|
||||||
|
|
||||||
|
task packageSources(type: Jar) {
|
||||||
|
classifier = 'sources'
|
||||||
|
from sourceSets.main.allSource
|
||||||
|
}
|
||||||
|
|
||||||
|
if (includeJavadoc) {
|
||||||
|
task packageJavadoc(type: Jar, dependsOn: 'javadoc') {
|
||||||
|
from javadoc.destinationDir
|
||||||
|
classifier = 'javadoc'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
task packageJavadoc(type: Jar) {
|
||||||
|
// Empty to satisfy Sonatype's javadoc.jar requirement
|
||||||
|
classifier 'javadoc'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives packageSources, packageJavadoc
|
||||||
|
}
|
||||||
|
|
||||||
|
signing {
|
||||||
|
sign configurations.archives
|
||||||
|
}
|
||||||
|
|
||||||
|
uploadArchives {
|
||||||
|
repositories {
|
||||||
|
mavenDeployer {
|
||||||
|
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
||||||
|
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
|
||||||
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
||||||
|
}
|
||||||
|
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
|
||||||
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
||||||
|
}
|
||||||
|
pom.project {
|
||||||
|
name projectName
|
||||||
|
packaging 'jar'
|
||||||
|
description projectDescription
|
||||||
|
url 'https://github.com/cretz/asmble'
|
||||||
|
scm {
|
||||||
|
connection 'scm:git:git@github.com:cretz/asmble.git'
|
||||||
|
developerConnection 'scm:git:git@github.com:cretz/asmble.git'
|
||||||
|
url 'git@github.com:cretz/asmble.git'
|
||||||
|
}
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name 'MIT License'
|
||||||
|
url 'https://opensource.org/licenses/MIT'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id 'cretz'
|
||||||
|
name 'Chad Retz'
|
||||||
|
url 'https://github.com/cretz'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user