Skip to content

Commit

Permalink
Merge pull request #7 from Mats-Hjalmar/feature/migrate-to-alsterverse
Browse files Browse the repository at this point in the history
Migrate to Alsterverse
  • Loading branch information
Mats-Hjalmar authored Oct 18, 2024
2 parents fda0d4e + 43a25fc commit 65b1568
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 39 deletions.
43 changes: 5 additions & 38 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The project is structured as follows:
### Clone the Repository

```sh
git clone https://github.com/Mats-Hjalmar/alster-modules.git
git clone https://github.com/Alsterverse/alster-modules.git
cd alster-modules
```

Expand Down Expand Up @@ -77,20 +77,16 @@ The project is configured to publish to GitHub Packages. To publish a new versio
./gradlew publish
```

## Adding to Other Projects
## Installation

To add the `Alster Player` repository to other projects via GitHub Packages, follow these steps:
To install a module from `Alster Modules`, follow these steps:

1. **Configure the `repositories` block in your `build.gradle.kts` file:**

```kotlin
repositories {
maven {
url = uri("https://maven.pkg.github.com/Mats-Hjalmar/alster-modules")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.token") as String? ?: System.getenv("TOKEN")
}
url = uri("https://maven.pkg.github.com/Alsterverse/alster-modules")
}
mavenCentral()
google()
Expand All @@ -101,36 +97,7 @@ To add the `Alster Player` repository to other projects via GitHub Packages, fol

```kotlin
commonMain.dependencies {
implementation("se.alster:player:1.0.3")
}
```

3. **Create a `github.properties` file:**

```properties
gpr.user=YOUR_GITHUB_USERNAME
gpr.token=YOUR_GITHUB_TOKEN
```

4. **Load the `github.properties` file:**

```kotlin
import java.util.Properties

val githubProperties = Properties().apply {
load(rootProject.file("github.properties").inputStream())
}

repositories {
maven {
url = uri("https://maven.pkg.github.com/Mats-Hjalmar/alster-modules")
credentials {
username = githubProperties.getProperty("gpr.user")
password = githubProperties.getProperty("gpr.token")
}
}
mavenCentral()
google()
implementation("se.alster:player:<version>")
}
```

Expand Down
2 changes: 1 addition & 1 deletion player/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Mats-Hjalmar/alster-modules")
url = uri("https://maven.pkg.github.com/Alsterverse/alster-modules")
credentials {
username = githubProperties.getProperty("gpr.user")
password = githubProperties.getProperty("gpr.token")
Expand Down

0 comments on commit 65b1568

Please sign in to comment.