Skip to content

Commit

Permalink
Update Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
ThexXTURBOXx committed Jan 8, 2022
1 parent 10b32a4 commit fe4226f
Show file tree
Hide file tree
Showing 10 changed files with 278 additions and 228 deletions.
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

6 changes: 3 additions & 3 deletions Procyon.CompilerTools/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
compileTestJava.options.encoding = 'UTF-8'

dependencies {
compile project(':Procyon.Core')
testCompile project(':Procyon.Reflection')
testCompile files('src/test/resources')
implementation project(':Procyon.Core')
testImplementation project(':Procyon.Reflection')
testImplementation files('src/test/resources')
}
10 changes: 4 additions & 6 deletions Procyon.Decompiler/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
uploadArchives.enabled = false

jar {
manifest {
attributes 'Title': archivesBaseName, 'Manifest-Version': '1.0', 'Version': version, 'Main-Class' : 'com.strobel.decompiler.DecompilerDriver'
attributes 'Title': archivesBaseName, 'Manifest-Version': '1.0', 'Version': archiveVersion, 'Main-Class' : 'com.strobel.decompiler.DecompilerDriver'
}

from {
Expand All @@ -11,7 +9,7 @@ jar {
}

dependencies {
compile 'com.beust:jcommander:1.78'
compile project(':Procyon.Core')
compile project(':Procyon.CompilerTools')
implementation 'com.beust:jcommander:1.78'
implementation project(':Procyon.Core')
implementation project(':Procyon.CompilerTools')
}
6 changes: 3 additions & 3 deletions Procyon.Expressions/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dependencies {
compile project(':Procyon.Core')
compile project(':Procyon.Reflection')
implementation project(':Procyon.Core')
implementation project(':Procyon.Reflection')
}

/*
about the surefire plugin..
http://forums.gradle.org/gradle/topics/does_anyone_know_how_to_configure_maven_surefire_plugin_with_gradle_for_unit_tests?page=1
*/
*/
4 changes: 2 additions & 2 deletions Procyon.Reflection/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
compile project(':Procyon.Core')
implementation project(':Procyon.Core')
}

/*
see Expressions build.gradle file for surefire plugin
*/
*/
131 changes: 56 additions & 75 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'maven-publish'

archivesBaseName = 'procyon'

Expand Down Expand Up @@ -35,7 +35,7 @@ final def procyonVersion = getProcyonVersion()
allprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'maven-publish'

buildDir = rootDir.canonicalPath + "/build/" + rootProject.relativePath(projectDir.canonicalPath)

Expand All @@ -48,8 +48,13 @@ allprojects {
mavenCentral()
}

java {
withJavadocJar()
withSourcesJar()
}

dependencies {
testCompile 'junit:junit:4.13.2'
testImplementation 'junit:junit:4.13.2'
}
}

Expand All @@ -58,10 +63,9 @@ allprojects {
//
rootProject.tasks.each { it.enabled = false }
rootProject.tasks.withType(DefaultTask).each { it.enabled = true }
rootProject.uploadArchives.enabled = false

subprojects {
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'

final boolean shouldSign = "true".equalsIgnoreCase(System.properties.getProperty("procyon.signing.enabled"))
Expand All @@ -75,22 +79,12 @@ subprojects {
}
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}

tasks.withType(Test) {
testLogging {
// set options for log level LIFECYCLE
events TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED
TestLogEvent.PASSED,
TestLogEvent.SKIPPED
exceptionFormat TestExceptionFormat.FULL
showExceptions true
showCauses true
Expand All @@ -99,11 +93,11 @@ subprojects {
// set options for log level DEBUG and INFO
debug.with {
events TestLogEvent.STARTED,
TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_ERROR,
TestLogEvent.STANDARD_OUT
TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_ERROR,
TestLogEvent.STANDARD_OUT
exceptionFormat TestExceptionFormat.FULL
}

Expand All @@ -125,8 +119,7 @@ subprojects {
artifacts {
archives jar
}
}
else {
} else {
javadoc {
options.encoding = 'UTF-8'
}
Expand All @@ -140,77 +133,65 @@ subprojects {
if (shouldSign) {
signing {
sign configurations.archives
sign publishing.publications.mavenJava
}
}

uploadArchives {
repositories.mavenDeployer {
if (shouldSign) {
beforeDeployment { MavenDeployment deployment ->
signing.signPom(deployment)
publishing {
repositories {
maven {
name 'Snapshots'
url 'https://oss.sonatype.org/content/repositories/snapshots'
credentials {
username = project.properties.get("procyon.sonatype.username")
password = project.properties.get("procyon.sonatype.password")
}
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: project.properties.get("procyon.sonatype.username"),
password: project.properties.get("procyon.sonatype.password"))
}

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: project.properties.get("procyon.sonatype.username"),
password: project.properties.get("procyon.sonatype.password"))
maven {
name 'Releases'
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
credentials {
username = project.properties.get("procyon.sonatype.username")
password = project.properties.get("procyon.sonatype.password")
}
}

pom {
}
publications {
mavenJava(MavenPublication) {
from components.java
groupId = project.group
version = project.version
artifactId = project.archivesBaseName

project {
name project.archivesBaseName
packaging 'jar'
description 'Procyon'
url 'https://github.com/mstrobel/procyon'

scm {
url 'https://github.com/mstrobel/procyon'
connection 'scm:git:https://github.com/mstrobel/procyon.git'
developerConnection 'scm:git:https://mstrobel@github.com/mstrobel/procyon.git'
}

issueManagement {
system 'github'
url 'https://github.com/mstrobel/procyon/issues'
}
pom {
name = project.archivesBaseName
description = 'Procyon'
url = 'https://github.com/mstrobel/procyon'

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}

developers {
developer {
id 'mstrobel'
name 'Mike Strobel'
roles {
role 'owner'
role 'packager'
role 'developer'
}
id = 'mstrobel'
name = 'Mike Strobel'
roles = ['owner', 'packager', 'developer']
}
}

dependencies {
dependency {
groupId 'junit'
artifactId 'junit'
version '4.11'
scope 'test'
// optional = true
}
scm {
connection = 'scm:git:https://github.com/mstrobel/procyon.git'
developerConnection = 'scm:git:https://mstrobel@github.com/mstrobel/procyon.git'
url = 'https://github.com/mstrobel/procyon'
}

issueManagement {
system = 'github'
url = 'https://github.com/mstrobel/procyon/issues'
}
}
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Sun Oct 27 14:39:59 EDT 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit fe4226f

Please sign in to comment.