add package uploading
This commit is contained in:
parent
1e982cd2ef
commit
6125772038
6
.github/workflows/tagged-release.yml
vendored
6
.github/workflows/tagged-release.yml
vendored
@ -25,10 +25,14 @@ jobs:
|
|||||||
gradle-version: "8.10"
|
gradle-version: "8.10"
|
||||||
- name: Build
|
- name: Build
|
||||||
run: gradle build
|
run: gradle build
|
||||||
|
- name: Publish
|
||||||
|
run: gradle publish
|
||||||
|
env:
|
||||||
|
ACCESS_TOKEN: "${{github.token}}"
|
||||||
|
REPO_URL: "${{github.api_url}}/packages/${{github.repository_owner}}/maven"
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: "https://gitea.com/actions/gitea-release-action@main"
|
uses: "https://gitea.com/actions/gitea-release-action@main"
|
||||||
with:
|
with:
|
||||||
# api_key: "${{secrets.TOKEN}}"
|
|
||||||
files: |
|
files: |
|
||||||
LICENSE
|
LICENSE
|
||||||
build/libs/*.jar
|
build/libs/*.jar
|
@ -9,4 +9,7 @@ java {
|
|||||||
toolchain {
|
toolchain {
|
||||||
languageVersion = JavaLanguageVersion.of(17);
|
languageVersion = JavaLanguageVersion.of(17);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withJavadocJar();
|
||||||
|
withSourcesJar();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java");
|
id("java");
|
||||||
|
id("maven-publish");
|
||||||
}
|
}
|
||||||
|
|
||||||
version = rootProject.version;
|
version = rootProject.version;
|
||||||
@ -20,3 +21,27 @@ dependencies {
|
|||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2");
|
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2");
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher");
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "Gitea";
|
||||||
|
url = uri(System.getenv("REPO_URL") ?: "");
|
||||||
|
|
||||||
|
credentials(HttpHeaderCredentials::class) {
|
||||||
|
name = "Authorization";
|
||||||
|
value = "token ${System.getenv("ACCESS_TOKEN")}";
|
||||||
|
}
|
||||||
|
|
||||||
|
authentication {
|
||||||
|
create<HttpHeaderAuthentication>("header");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("maven") {
|
||||||
|
from(components["java"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -32,7 +32,7 @@ public final class FunctionScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns If a variable with the same name exists, the old variable. Otherwise, the given variable
|
* @return If a variable with the same name exists, the old variable. Otherwise, the given variable
|
||||||
*/
|
*/
|
||||||
public Variable define(Variable var) {
|
public Variable define(Variable var) {
|
||||||
if (passthrough) return null;
|
if (passthrough) return null;
|
||||||
@ -48,7 +48,7 @@ public final class FunctionScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns A variable with the given name, or null if a global variable
|
* @return A variable with the given name, or null if a global variable
|
||||||
*/
|
*/
|
||||||
public Variable define(String name) {
|
public Variable define(String name) {
|
||||||
return define(new Variable(name, false));
|
return define(new Variable(name, false));
|
||||||
|
@ -175,7 +175,7 @@ public final class VariableList implements Iterable<Variable> {
|
|||||||
this.offset = () -> offset;
|
this.offset = () -> offset;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param offset Will offset the indices by the size of the given list
|
* @param prev Will offset the indices by the size of the given list
|
||||||
*/
|
*/
|
||||||
public VariableList(IndexType type, VariableList prev) {
|
public VariableList(IndexType type, VariableList prev) {
|
||||||
this.indexType = type;
|
this.indexType = type;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
project_group = me.topchetoeu
|
project_group = me.topchetoeu.j2s
|
||||||
project_name = j2s
|
project_name = j2s
|
||||||
project_version = 0.10.5-beta
|
project_version = 0.10.5-beta
|
||||||
main_class = me.topchetoeu.j2s.repl.SimpleRepl
|
main_class = me.topchetoeu.j2s.repl.SimpleRepl
|
||||||
|
@ -31,8 +31,6 @@ public interface DebugHandler {
|
|||||||
* Called when a script has been loaded
|
* Called when a script has been loaded
|
||||||
* @param filename The name of the source
|
* @param filename The name of the source
|
||||||
* @param source The name of the source
|
* @param source The name of the source
|
||||||
* @param breakpoints A set of all the breakpointable locations in this source
|
|
||||||
* @param map The source map associated with this file. null if this source map isn't mapped
|
|
||||||
*/
|
*/
|
||||||
public void onSourceLoad(Filename filename, String source);
|
public void onSourceLoad(Filename filename, String source);
|
||||||
|
|
||||||
|
@ -429,7 +429,6 @@ public abstract class Value {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @internal */
|
|
||||||
public List<String> toReadableLines(Environment env, HashSet<ObjectValue> passed) {
|
public List<String> toReadableLines(Environment env, HashSet<ObjectValue> passed) {
|
||||||
return Arrays.asList(toString(env));
|
return Arrays.asList(toString(env));
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,10 @@ plugins {
|
|||||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0";
|
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
// rootProject.name = properties.project_name;
|
rootProject.name = extra.properties["project_name"].toString();
|
||||||
|
|
||||||
include(":lib");
|
include(":lib");
|
||||||
include(":common");
|
include(":common");
|
||||||
include(":repl");
|
include(":repl");
|
||||||
include(":runtime");
|
include(":runtime");
|
||||||
include(":compilation");
|
include(":compilation");
|
||||||
|
Loading…
Reference in New Issue
Block a user