Skip to content

Commit

Permalink
Minotaur v2 with new extension-based configuration (#13)
Browse files Browse the repository at this point in the history
* Update gradle, general reformat, change to v2

* Rewrite minotaur to use an extension for cleaner buildscripts

* Documentation-ish

* documentation++; also work on dependencies a bit

* Work on defaults

* that wasn't intentional

* various fixes, working towards parity with v1

* Fix & document dependencies, other things

* documentation++;

* Misc changes
  • Loading branch information
triphora authored Feb 17, 2022
1 parent 4cb652e commit afede98
Show file tree
Hide file tree
Showing 40 changed files with 1,181 additions and 1,329 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If applicable, add screenshots to help explain your problem.

**Environment Info:**
- Gradle Version:
- DiluvGradle Version:
- Minotaur Version:
- API: local/staging/production

**Additional context**
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: adopt

- name: Build with Gradle
run: ./gradlew build
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#################
## Diluv
#################

*.pem
rsa.private
/public
Expand Down
201 changes: 114 additions & 87 deletions README.md

Large diffs are not rendered by default.

58 changes: 15 additions & 43 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
plugins {
id 'java'
id "com.gradle.plugin-publish" version "0.13.0"
id "java-gradle-plugin"
id 'com.gradle.plugin-publish' version '0.19.0'
id 'java-gradle-plugin'
id 'maven-publish'
}

version = "${project_version}"
version = '2.0.0-SNAPSHOT'
group = 'com.modrinth.minotaur'
archivesBaseName = 'Minotaur'
description = 'Modrinth plugin for publishing builds to the website!'

sourceCompatibility = 1.8
targetCompatibility = 1.8
String vendor = 'Modrinth'

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

repositories {
jcenter()
mavenCentral()
}

dependencies {
compile gradleApi()
compileOnly gradleApi()

implementation group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.13'
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'

testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.7.1'
}

test {
useJUnitPlatform()
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.9'
}

gradlePlugin {
Expand Down Expand Up @@ -58,42 +54,18 @@ jar {
attributes([
'Timestamp' : System.currentTimeMillis(),
'Specification-Title' : project.archivesBaseName,
'Specification-Vendor' : project.vendor,
'Specification-Vendor' : vendor,
'Specification-Version' : project.version,
'Implementation-Title' : project.archivesBaseName,
'Implementation-Version' : project.version,
'Implementation-Vendor' : project.vendor,
'Implementation-Vendor' : vendor,
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})"
])
}
}

task sourcesJar(type: Jar, dependsOn: classes) {
description = 'Creates a JAR containing the source code.'
from sourceSets.main.allSource
archiveClassifier = 'sources'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
description = 'Creates a JAR containing the JavaDocs.'
from javadoc.destinationDir
archiveClassifier = 'javadoc'
java {
withSourcesJar()
withJavadocJar()
}

artifacts {
archives sourcesJar
archives javadocJar
}

static String getBuildNumber() {
return System.getenv("GITHUB_RUN_NUMBER") ?: "0"
}

static boolean isSnapshot() {
String ref = System.getenv("GITHUB_REF");
if (ref != null && ref.startsWith("refs/tags/v")) {
return false
}
return true
}
6 changes: 0 additions & 6 deletions gradle.properties

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit afede98

Please sign in to comment.