Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upstream #1

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7c3a572
Add type annotation support and mapping info in jd gen (#6)
liach Dec 23, 2020
3276281
Release via github actions
modmuss50 Dec 23, 2020
54e8ec2
Add checkVersion task
modmuss50 Dec 23, 2020
9abf2a8
Make gradlew executable
modmuss50 Dec 23, 2020
757d21c
Mixin selector go brr
i509VCB Dec 23, 2020
4c1c8b9
Bump version, thanks i509vcb
liach Dec 23, 2020
9b7e91c
Make mappings table match javadoc style and remove deprecated attribu…
altrisi Dec 24, 2020
982f4a0
Copy the mapping table items on click (#9)
altrisi Dec 24, 2020
01e9d6a
0.2.2
liach Dec 24, 2020
9ca22d4
Move the copy on click script to yarn
liach Jan 8, 2021
c3c3025
Put the copy on click and jd header bakc to mappingpoet. let yarn pol…
liach Jan 10, 2021
1d04eda
0.2.5: Use builtin stylesheet (edited from that for fabricmc.net)
liach Jan 20, 2021
527ce06
typo
liach Jan 20, 2021
ba8e7f6
Fixes #12
liach Jan 20, 2021
ccf6adf
This appears to fix #13
liach Jan 20, 2021
cbbcdcc
Fixes #14
liach Feb 22, 2021
947b6a6
Fixes #21, tries to fix #20
liach Apr 1, 2021
8c5d438
Better char literals
liach Apr 1, 2021
02a53b5
Update dependencies
liach May 14, 2021
94c1480
Fix redundant public modifier for inner classes, migrate to modern java
liach May 14, 2021
35ee303
Forgot to bump this
liach May 14, 2021
7f47cd7
So we never published the readme
liach May 14, 2021
24d0ec7
Update gradle, use forked javapoet
liach Sep 18, 2021
d6765ad
Preliminary work on getting records and sealed classes right
liach Sep 18, 2021
512c27e
It works. Bump to 0.2.9, don't expose the github dependency (requires
liach Sep 19, 2021
e871a21
Consider package private final fields in record as components for pro…
liach Sep 23, 2021
03eb545
Build against fabric's javapoet fork
modmuss50 Oct 27, 2021
56ddd7f
Remove default modifier from private interface methods.
modmuss50 Oct 27, 2021
e87bc5c
Skip over anonymous records to fix generation failure.
modmuss50 Oct 27, 2021
f4b8811
Remove github token from actions.
modmuss50 Oct 27, 2021
15aeb4c
This looks like why it was problematic
liach Nov 17, 2021
9c30604
Add taglet for putting up record stripping warnings
liach Nov 18, 2021
9ca92a1
license
liach Nov 18, 2021
1fda8f9
Revert "license"
liach Nov 23, 2021
93a57cf
Do not dump local class by checking EnclosingMethod attribute
liach Mar 20, 2022
bed78ea
Update gradle, bump version
liach Mar 20, 2022
ddd25e1
Bump version
modmuss50 Oct 20, 2022
4a8d35d
0.4.0
liach May 5, 2023
3af9804
Update Gradle and github actions
modmuss50 May 20, 2023
37aa1f2
Update docker image for build
modmuss50 May 20, 2023
f35cb73
Dont use gradle toolchains.
modmuss50 May 20, 2023
6c09b18
Update ASM
modmuss50 Mar 27, 2024
eef318f
Improve debug output, update javapoet (#32)
sfPlayer1 May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
java: [17-jdk]
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:${{ matrix.java }}
options: --user root
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew build test --stacktrace
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release
on: [workflow_dispatch] # Manual trigger
jobs:
build:
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:17-jdk
options: --user root
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew checkVersion build publish --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
!/.gitignore
!/.editorconfig
!/build.gradle
!/gradle.properties
!/gradlew
!/gradlew.bat
!/settings.gradle
!/LICENSE
!/HEADER
!/Jenkinsfile
!/.github
!/readme.md
28 changes: 15 additions & 13 deletions HEADER
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Copyright (c) 2020 FabricMC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
/*
* Copyright (c) $YEAR FabricMC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
8 changes: 0 additions & 8 deletions Jenkinsfile

This file was deleted.

177 changes: 107 additions & 70 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,70 +1,107 @@
plugins {
id 'java'
id 'maven-publish'
}

group 'net.fabricmc'
version '0.1.0'

sourceCompatibility = 1.8

def ENV = System.getenv()
version = version + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local")

repositories {
mavenCentral()
maven {
name = 'Fabric'
url = 'http://maven.modmuss50.me/'
}
}

dependencies {
compile 'com.squareup:javapoet:1.12.1'
compile 'net.fabricmc:tiny-mappings-parser:0.2.2.14'
runtimeOnly 'com.google.guava:guava:28.2-jre'

compile 'org.ow2.asm:asm:8.0'
compile 'org.ow2.asm:asm-analysis:8.0'
compile 'org.ow2.asm:asm-commons:8.0'
compile 'org.ow2.asm:asm-tree:8.0'
compile 'org.ow2.asm:asm-util:8.0'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
}

test {
useJUnitPlatform()
}

jar {
manifest {
attributes 'Implementation-Title': 'MappingPoet',
'Implementation-Version': version,
'Main-Class': "net.fabricmc.mappingpoet.Main"
}
}

apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.gradle'

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// select the repositories you want to publish to
repositories {
if (project.hasProperty('mavenPass')) {
maven {
url = "http://mavenupload.modmuss50.me/"
credentials {
username = "buildslave"
password = project.getProperty('mavenPass')
}
}
}
}
}
plugins {
id 'java'
id 'eclipse'
id 'maven-publish'
id 'com.diffplug.spotless' version '5.8.2'
}

group 'net.fabricmc'
version '0.4.2'

def ENV = System.getenv()
version = version + (ENV.GITHUB_ACTIONS ? "" : "+local")

repositories {
mavenCentral()
maven {
name = 'Fabric'
url = 'https://maven.modmuss50.me/'
}
}

dependencies {
implementation 'net.fabricmc:javapoet:0.1.1'
implementation 'net.fabricmc:mapping-io:0.4.0'

implementation 'org.ow2.asm:asm:9.7'
implementation 'org.ow2.asm:asm-analysis:9.7'
implementation 'org.ow2.asm:asm-commons:9.7'
implementation 'org.ow2.asm:asm-tree:9.7'
implementation 'org.ow2.asm:asm-util:9.7'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.1'
}

java {
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType(JavaCompile) {
options.release = 17
options.encoding = "UTF-8"
}

test {
useJUnitPlatform()
}

tasks.withType(Jar) {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
}

jar {
manifest {
attributes 'Implementation-Title': 'MappingPoet',
'Implementation-Version': archiveVersion,
'Main-Class': "net.fabricmc.mappingpoet.Main"
}
}

import com.diffplug.spotless.LineEnding
spotless {
lineEndings = LineEnding.UNIX
java {
licenseHeaderFile(file("HEADER")).yearSeparator(", ")
}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// select the repositories you want to publish to
repositories {
if (ENV.MAVEN_URL) {
maven {
url ENV.MAVEN_URL
credentials {
username ENV.MAVEN_USERNAME
password ENV.MAVEN_PASSWORD
}
}
}
}
}

// A task to ensure that the version being released has not already been released.
task checkVersion {
doFirst {
def xml = new URL("https://maven.fabricmc.net/net/fabricmc/mappingpoet/maven-metadata.xml").text
def metadata = new XmlSlurper().parseText(xml)
def versions = metadata.versioning.versions.version*.text();
if (versions.contains(version)) {
throw new RuntimeException("${version} has already been released!")
}
}
}

publish.mustRunAfter checkVersion
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Apr 05 23:36:17 BST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading