Skip to content

Commit

Permalink
Adding gradle config to push to server; Adding main
Browse files Browse the repository at this point in the history
  • Loading branch information
mainstringargs committed Apr 11, 2019
1 parent 82f60f2 commit 50dff53
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 4 deletions.
94 changes: 90 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,39 @@
* user guide available at https://docs.gradle.org/4.3/userguide/java_library_plugin.html
*/

buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}

dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
// add additional dependencies here if you wish to reference instead of generate them (see example directory)
}
}


plugins {
id 'org.unbroken-dome.xjc' version '1.4.0'
id 'maven-publish'
id 'io.codearte.nexus-staging' version '0.11.0'
}

// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'
// Apply the java plugin to add support for Java
apply plugin: 'java'

// Apply the application plugin to add support for building an application
apply plugin: 'application'
apply plugin: 'eclipse'

apply plugin: 'com.bmuschko.nexus'

archivesBaseName = 'FunStart4j'
group = 'io.github.mainstringargs'
version = '1.0.0'

// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
Expand All @@ -38,7 +63,7 @@ xjcGenerate {

jar {
manifest {
attributes 'Main-Class': 'io.github.mainstringargs.funstart4j.FunStart4j'
attributes 'Main-Class': 'io.github.mainstringargs.funstart4j.FunStart4jGUI'
}

from {
Expand All @@ -48,4 +73,65 @@ jar {

compileJava {
options.debug = true
}
}

modifyPom {
project {
name 'FunStart4j'
description 'A Java Webstart Alternative technology with support for JNLPs.'
url 'https://github.com/mainstringargs/FunStart4j'
inceptionYear '2019'
scm {
url 'https://github.com/mainstringargs/FunStart4j'
connection 'https://github.com/mainstringargs/FunStart4j.git'
developerConnection 'https://github.com/mainstringargs/FunStart4j.git'
}
licenses {
license {
name 'MIT License'
url 'https://opensource.org/licenses/MIT'
distribution 'repo'
}
}
developers {
developer {
id 'mainstringargs'
name 'main(String[] args)'
email '[email protected]'
}
}
}
}

publishing {
publications {
maven(MavenPublication) {

from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
extraArchive {
sources = true
tests = true
javadoc = true
}
nexus {
sign = true
repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
}

nexusStaging {
packageGroup = "io.github.mainstringargs" //optional if packageGroup == project.getGroup()
}


// Define the main class for the application
mainClassName = 'io.github.mainstringargs.funstart4j.FunStart4jGUI'

run {

}
4 changes: 4 additions & 0 deletions upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

./gradlew uploadArchives
./gradlew closeAndReleaseRepository

0 comments on commit 50dff53

Please sign in to comment.