Skip to content

Commit

Permalink
Refactor codebase for improved maintainability
Browse files Browse the repository at this point in the history
  • Loading branch information
teogor committed Aug 20, 2024
1 parent 5c3edd1 commit 445e942
Show file tree
Hide file tree
Showing 154 changed files with 864 additions and 257 deletions.
116 changes: 0 additions & 116 deletions .winds/resources/bom/1.0.0-alpha01/dependencies-1.0.0-alpha01.json

This file was deleted.

20 changes: 0 additions & 20 deletions .winds/resources/bom/versions.json

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions drifter-bom/build.gradle.kts → bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
* limitations under the License.
*/

import com.vanniktech.maven.publish.SonatypeHost
import dev.teogor.winds.api.ArtifactIdFormat
import dev.teogor.winds.ktx.createVersion

plugins {
alias(libs.plugins.teogor.winds)
}

winds.publishingOptions.sonatypeHost = SonatypeHost.S01
winds {
moduleMetadata {
isBom = true
Expand Down
22 changes: 18 additions & 4 deletions codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

import com.vanniktech.maven.publish.SonatypeHost
/*
* Copyright 2024 teogor (Teodor Grigor)
*
* 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
*
* https://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.
*/

plugins {
id("java-library")
Expand All @@ -28,8 +43,8 @@ java {
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
compilerOptions {
jvmTarget = JvmTarget.JVM_11
}
}

Expand All @@ -40,7 +55,6 @@ dependencies {
api(libs.kotlin.poet.ksp)
}

winds.publishingOptions.sonatypeHost = SonatypeHost.S01
winds {
moduleMetadata {
artifactDescriptor {
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 8 additions & 6 deletions ksp/build.gradle.kts → compiler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.kotlin.jvm)
Expand All @@ -27,10 +27,9 @@ java {
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
compilerOptions {
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
jvmTarget = JvmTarget.JVM_11
}
}

Expand All @@ -41,11 +40,14 @@ dependencies {
implementation(libs.ksp.api)
}

winds.publishingOptions.sonatypeHost = SonatypeHost.S01
winds {
moduleMetadata {
artifactDescriptor {
name = "KSP"
}
}

documentationBuilder {
isCompiler = true
}
}
File renamed without changes.
File renamed without changes.
8 changes: 3 additions & 5 deletions drifter-compose/build.gradle.kts → compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* limitations under the License.
*/

import com.vanniktech.maven.publish.SonatypeHost

plugins {
alias(libs.plugins.ceres.android.library)
alias(libs.plugins.ceres.android.library.compose)
alias(libs.plugins.jetbrains.compose.compiler)
alias(libs.plugins.teogor.winds)
}

Expand Down Expand Up @@ -47,8 +46,8 @@ dependencies {
api(libs.ceres.core.common)

implementation(projects.unity.common)
implementation(projects.drifterIntegration)
implementation(projects.drifterWallpaper)
implementation(projects.integration)
implementation(projects.wallpaper)

implementation(platform(libs.compose.bom))
implementation(libs.ui)
Expand All @@ -59,7 +58,6 @@ dependencies {
implementation(libs.lifecycle.runtime.ktx)
}

winds.publishingOptions.sonatypeHost = SonatypeHost.S01
winds {
moduleMetadata {
artifactDescriptor {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions core/api/core.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
public final class dev/teogor/drifter/core/Serializable {
public fun <init> (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
}

public class dev/teogor/drifter/core/UnityMessageSender {
public fun <init> (Ljava/lang/String;)V
public final fun sendMessage (Ljava/lang/String;Lorg/json/JSONObject;)V
}

public class dev/teogor/drifter/core/UnityPlayerPrefs {
public fun <init> ()V
protected fun get (Ljava/lang/String;Ljava/lang/Object;Ldev/teogor/drifter/core/Serializable;)Ljava/lang/Object;
public static synthetic fun get$default (Ldev/teogor/drifter/core/UnityPlayerPrefs;Ljava/lang/String;Ljava/lang/Object;Ldev/teogor/drifter/core/Serializable;ILjava/lang/Object;)Ljava/lang/Object;
protected fun set (Ljava/lang/String;Ljava/lang/Object;Ldev/teogor/drifter/core/Serializable;)Ljava/lang/Object;
public static synthetic fun set$default (Ldev/teogor/drifter/core/UnityPlayerPrefs;Ljava/lang/String;Ljava/lang/Object;Ldev/teogor/drifter/core/Serializable;ILjava/lang/Object;)Ljava/lang/Object;
}

public abstract interface annotation class dev/teogor/drifter/core/UnityPrefAccess : java/lang/annotation/Annotation {
}

9 changes: 3 additions & 6 deletions drifter-common/build.gradle.kts → core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,24 @@
* limitations under the License.
*/

import com.vanniktech.maven.publish.SonatypeHost

plugins {
alias(libs.plugins.ceres.android.library)
alias(libs.plugins.teogor.winds)
}

android {
namespace = "dev.teogor.drifter.common"
namespace = "dev.teogor.drifter.core"
}

dependencies {
implementation(projects.integration)
implementation(projects.unity.common)
implementation(projects.drifterIntegration)
}

winds.publishingOptions.sonatypeHost = SonatypeHost.S01
winds {
moduleMetadata {
artifactDescriptor {
name = "Common"
name = "Core"
}
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package dev.teogor.drifter.common
package dev.teogor.drifter.core

/**
* A class that encapsulates serialization and deserialization logic for a specific type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package dev.teogor.drifter.common
package dev.teogor.drifter.core

import dev.teogor.drifter.unity.common.UnityEngine
import org.json.JSONObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package dev.teogor.drifter.common
package dev.teogor.drifter.core

import dev.teogor.drifter.integration.core.PlayerPrefs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package dev.teogor.drifter.common
package dev.teogor.drifter.core

@RequiresOptIn(
message = "This function interacts directly with Unity PlayerPrefs. Incorrect usage can lead to data corruption or security vulnerabilities.",
Expand Down
File renamed without changes.
13 changes: 7 additions & 6 deletions app/build.gradle.kts → demo/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
plugins {
alias(libs.plugins.ceres.android.application)
alias(libs.plugins.ceres.android.application.compose)
alias(libs.plugins.jetbrains.compose.compiler)
alias(libs.plugins.ksp)
}

Expand Down Expand Up @@ -52,16 +53,16 @@ android {
}

dependencies {
implementation(projects.moduleUnity)
implementation(projects.demo.moduleUnity)

implementation(projects.runtime)
ksp(projects.ksp)
ksp(projects.compiler)

implementation(projects.drifterCommon)
implementation(projects.drifterCompose)
implementation(projects.compose)
implementation(projects.core)
implementation(projects.unity.v202237f1)
implementation(projects.drifterIntegration)
implementation(projects.drifterWallpaper)
implementation(projects.integration)
implementation(projects.wallpaper)

implementation(platform(libs.ceres.bom))
implementation(libs.ceres.core.register)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
Loading

0 comments on commit 445e942

Please sign in to comment.