Skip to content

Commit

Permalink
AppCenter Meta
Browse files Browse the repository at this point in the history
  • Loading branch information
XyperCode committed Apr 2, 2024
1 parent 00a5c42 commit 77c52ff
Show file tree
Hide file tree
Showing 35 changed files with 590 additions and 900 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,3 @@ task run(type: Exec) {
def adb = path + "/platform-tools/adb"
commandLine "$adb", 'shell', 'am', 'start', '-n', 'com.ultreon.bubbles/com.ultreon.bubbles.AndroidLauncher'
}

publishing {
publications {
release(MavenPublication) {
groupId = project_group
artifactId = project_id
version = project_version

afterEvaluate {
println(components.properties)
from components.release_aab
}
}
}
}

//eclipse.project.name = project_name + "-android"
140 changes: 99 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//file:noinspection GroovyUnusedCatchParameter


import com.ultreon.gameutils.GameUtilsExt
import org.jetbrains.gradle.ext.Application

import java.nio.file.Files
Expand Down Expand Up @@ -39,19 +40,36 @@ plugins {
id 'maven-publish'
id 'java'
id 'java-library'
id 'application'
// id 'com.github.johnrengelman.shadow' version '7.+'
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7"
}
apply plugin: "org.jetbrains.gradle.plugin.idea-ext"
apply plugin: "gameutils"

//apply plugin: 'maven-publish'

//****************************//
// Setting up main properties //
//****************************//

version project_version
version project_version + "+snapshot." + new Date().format("yyyy.MM.dd.HH.mm")
group project_group

extensions.getByType(GameUtilsExt).with {
projectName = "Bubble Blaster"

projectVersion = "$project_version"
projectGroup = "io.github.ultreon.bubbles"
projectId = "bubble-blaster"
production = true

coreProject = project(":core")
desktopProject = project(":desktop")
packageProject = project(":desktop-merge")

mainClass = "net.fabricmc.loader.impl.launch.knot.KnotClient"
javaVersion = 11
}

//**********************//
// Repositories //
//**********************//
Expand All @@ -75,49 +93,65 @@ repositories {
maven {
name "JitPack"
url 'https://jitpack.io'

content {
includeGroup "com.github.JnCrMx"
includeGroup "space.earlygrey"
}
}
flatDir {
name "Project Libraries"
dirs "${projectDir}/libs"
}
}

beforeEvaluate {

/*****************
* Configurations
*/
configurations {
// configuration that holds jars to include in the jar
implementation {
canBeResolved true
}
include {
canBeResolved true
}
addToJar {
canBeResolved true
configurations {
// configuration that holds jars to include in the jar
implementation {
canBeResolved true
}
include {
canBeResolved true
}
addToJar {
canBeResolved true
}
}
}

/***************
* Dependencies
*/
dependencies {
// Projects
implementation(project(":core"))
implementation(project(":desktop"))
dependencies {
// Projects
implementation(project(":core"))
implementation(project(":desktop"))
implementation(project(":gameprovider"))
}

dependencies {
implementation project(":core")
implementation project(":desktop")
implementation project(":desktop-merge")
implementation project(":gameprovider")
implementation project(":minimal")
}
}

base {
archivesName = project.archivesBaseName
}

allprojects {
apply plugin: "maven-publish"

publishing {
publications {
version project_version + "+snapshot." + new Date().format("yyyy.MM.dd.HH.mm")

}
repositories {

}
}
group project_group

repositories {
mavenLocal()
Expand All @@ -126,6 +160,11 @@ allprojects {
maven {
name "JitPack"
url 'https://jitpack.io'

content {
includeGroup "com.github.JnCrMx"
includeGroup "space.earlygrey"
}
}
maven {
name "Maven Central"
Expand All @@ -135,8 +174,6 @@ allprojects {
name "FabricMC"
url "https://maven.fabricmc.net/"
}
maven { url "https://github.com/Ultreon/ultreon-data/raw/main/.mvnrepo/" }
maven { url "https://github.com/Ultreon/corelibs/raw/main/.mvnrepo/" }
flatDir {
name "Project Libraries"
dirs "${projectDir}/libs"
Expand All @@ -145,19 +182,22 @@ allprojects {
name "Project Libraries"
dirs "${rootProject.projectDir}/libs"
}

maven {
name = "BubbleBlasterMaven"
url = uri("https://maven.pkg.github.com/Ultreon/bubble-blaster-2")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}

dependencies {

}

// publish.dependsOn build
}

tasks.create('prepareRun', {
Files.createDirectories(Paths.get(projectDir.getAbsolutePath(), "run"))
})

tasks.withType(JavaCompile).configureEach {
options.fork = true
options.incremental = true
Expand Down Expand Up @@ -209,14 +249,6 @@ artifacts {
// packedJar
}

dependencies {
runtimeOnly project(":core")
runtimeOnly project(":desktop")
runtimeOnly project(":desktop-merge")
runtimeOnly project(":gameprovider")
runtimeOnly project(":minimal")
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
Expand Down Expand Up @@ -253,6 +285,13 @@ def cp = "$rcl"
def cpFile = file("$buildDir.absolutePath/bubbles/classpath.txt")
Files.writeString(cpFile.toPath(), cp, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE)

application {
applicationDefaultJvmArgs = ["-Xmx2g", "-Dfabric.dli.config=$launchFile.path", "-Dfabric.dli.env=CLIENT", "-Dfabric.dli.main=net.fabricmc.loader.impl.launch.knot.KnotClient"]
mainClass = 'net.fabricmc.devlaunchinjector.Main'
}

run.workingDir("$rootProject.projectDir/run")

idea{
project{
settings {
Expand All @@ -272,3 +311,22 @@ idea{
}
}
}

publishing {
publications {
mavenJava(MavenPublication) {
groupId = project.group
artifactId = "bubble-blaster"
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Ultreon/bubble-blaster-2")
credentials {
username = project.findProperty("gpr.user") == null ? System.getenv("USERNAME") : project.findProperty("gpr.user")
password = project.findProperty("gpr.key") == null ? System.getenv("TOKEN") : project.findProperty("gpr.key")
}
}
}
}
31 changes: 22 additions & 9 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
plugins {
id 'java-gradle-plugin' // so we can assign and ID to our plugin
id 'org.jetbrains.kotlin.jvm' version "1.9.0"
id 'org.jetbrains.kotlin.jvm' version "1.9.22"
id 'java'
id 'java-library'
}

dependencies {
api 'org.ow2.asm:asm:9.6'
api 'com.google.code.gson:gson:2.10.1'
compileOnly api("gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.1.8"), {
exclude(group: 'com.google.guava', module: 'guava')
}

compileOnly api("com.google.guava:guava:33.1.0-jre")
}

java {
sourceCompatibility = "11"
targetCompatibility = "11"
}

kotlin {
jvmToolchain 11
}

repositories {
mavenCentral()
gradlePluginPortal()
}

gradlePlugin {
plugins {
// here we register our plugin with an ID
register("extra-java-module-info") {
id = "extra-java-module-info"
implementationClass = "org.gradle.sample.transform.javamodules.ExtraModuleInfoPlugin"
}
register("bubbles-gradle") {
id = "bubbles-gradle"
implementationClass = "com.ultreon.bubbles.gradle.BubblesGradlePlugin"
register("gameutils") {
id = "gameutils"
implementationClass = "com.ultreon.gameutils.GameUtilsPlugin"
}
}

}
19 changes: 19 additions & 0 deletions buildSrc/src/main/groovy/com/ultreon/gameutils/Dep.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.ultreon.gameutils

class Dep {
String group
String name
String version
String extension
String classifier
File file

Dep(String group, String name, String version, String extension, String classifier, File file) {
this.group = group
this.name = name
this.version = version
this.extension = extension
this.classifier = classifier
this.file = file
}
}
19 changes: 19 additions & 0 deletions buildSrc/src/main/groovy/com/ultreon/gameutils/GameUtilsExt.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.ultreon.gameutils

import org.gradle.api.Project
import java.time.Instant

class GameUtilsExt {
String projectName
String projectVersion = "dev"
String projectGroup = "com.example"
String projectId = "example-project"
Project coreProject
Project desktopProject
Project packageProject
int javaVersion = -1
boolean production = false
final buildDate = Instant.now()
File runDirectory
String mainClass
}
Loading

0 comments on commit 77c52ff

Please sign in to comment.