Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v4

- name: Build Dockerised CLI
run: docker build -t sourcegraph/scip-java:latest .
run: docker build -t ghcr.io/scip-code/scip-java:latest .

- name: Test repos
shell: bash
Expand All @@ -58,7 +58,7 @@ jobs:
mkdir -p ".repos/$REPO"
git clone "https://github.com/$REPO.git" ".repos/$REPO" && cd ".repos/$REPO" && git submodule update --init

docker run -v "$PWD/.repos/$REPO:/sources" -w /sources sourcegraph/scip-java:latest scip-java index
docker run -v "$PWD/.repos/$REPO:/sources" -w /sources ghcr.io/scip-code/scip-java:latest scip-java index
file ".repos/$REPO/index.scip" || (echo "$REPO SCIP index doesn't exist!"; exit 1)
}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ jobs:
printf 'SCIP_JAVA_VERSION=%s\n' "$SCIP_JAVA_VERSION" >> "$GITHUB_ENV"
printf 'SCIP_JAVA_CLI=%s\n' "$PWD/scip-java/build/install/scip-java/bin/scip-java" >> "$GITHUB_ENV"

- run: mvn clean verify -DskipTests "-Dscip-java.version=$SCIP_JAVA_VERSION" sourcegraph:sourcegraphDependencies
- run: mvn clean verify -DskipTests "-Dscip-java.version=$SCIP_JAVA_VERSION" scip:dependencies
working-directory: examples/maven-example

- run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
cd "$OUT_DIR"

VERSION=${VERSION#v}
ARTIFACT="com.sourcegraph:scip-java:${VERSION}"
ARTIFACT="org.scip-code:scip-java:${VERSION}"

for attempt in {1..10}; do
if cs resolve "$ARTIFACT" >/dev/null 2>&1; then
Expand All @@ -57,7 +57,7 @@ jobs:
--bat=true \
-o scip-java \
"$ARTIFACT" \
--main com.sourcegraph.scip_java.ScipJava
--main org.scip_code.scip_java.ScipJava

chmod +x scip-java
./scip-java --help >/dev/null
Expand All @@ -74,11 +74,11 @@ jobs:
run: |
set -euo pipefail

if gh release view "$TAG" --repo "sourcegraph/scip-java" >/dev/null 2>&1; then
if gh release view "$TAG" --repo "scip-code/scip-java" >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
echo "GitHub release $TAG does not exist in sourcegraph/scip-java; skipping asset upload."
echo "GitHub release $TAG does not exist in scip-code/scip-java; skipping asset upload."
fi

- name: Upload release assets
Expand All @@ -96,5 +96,5 @@ jobs:
"scip-java-${TAG}" \
"scip-java-${TAG}.bat" \
"scip-java-${TAG}.sha256" \
--repo "sourcegraph/scip-java" \
--repo "scip-code/scip-java" \
--clobber
83 changes: 71 additions & 12 deletions .github/workflows/release-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,91 @@ on:
branches:
- main
tags: ["*"]

permissions:
contents: read
packages: write

jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- runner: ubuntu-latest
arch: amd64
- runner: ubuntu-24.04-arm
arch: arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: docker/setup-buildx-action@v3
- name: Login to DockerHub

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Resolve Docker tag
id: tag
shell: bash
run: |
set -euo pipefail

tags=(--tag sourcegraph/scip-java:latest-snapshot)

image="ghcr.io/scip-code/scip-java"
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
version="${GITHUB_REF_NAME#v}"
tags=(
--tag sourcegraph/scip-java:latest
--tag "sourcegraph/scip-java:${version}"
)
tag="${image}:${version}-${{ matrix.arch }}"
else
tag="${image}:latest-snapshot-${{ matrix.arch }}"
fi

docker buildx build --push "${tags[@]}" .
echo "tag=${tag}" >> "$GITHUB_OUTPUT"

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/${{ matrix.arch }}
tags: ${{ steps.tag.outputs.tag }}
labels: |
org.opencontainers.image.source=https://github.com/scip-code/scip-java
org.opencontainers.image.revision=${{ github.sha }}

publish-manifest:
needs: publish
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Create and push multi-arch manifest
shell: bash
run: |
set -euo pipefail

image="ghcr.io/scip-code/scip-java"
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
version="${GITHUB_REF_NAME#v}"
docker buildx imagetools create \
--tag "${image}:latest" \
--tag "${image}:${version}" \
"${image}:${version}-amd64" \
"${image}:${version}-arm64"
else
docker buildx imagetools create \
--tag "${image}:latest-snapshot" \
"${image}:latest-snapshot-amd64" \
"${image}:latest-snapshot-arm64"
fi
11 changes: 5 additions & 6 deletions .github/workflows/release-maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ jobs:
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: nix develop --command gradle --no-daemon publishToMavenCentral
env:
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
- name: Publish release ${{ github.ref }}
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
version="${GITHUB_REF_NAME#v}"
nix develop --command gradle --no-daemon \
"-PreleaseVersion=$version" publishAndReleaseToMavenCentral
env:
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.PGP_SECRET }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.PGP_PASSPHRASE }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}

release-cli:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Contributing guide

This page documents tips and tricks for contributing to the
[sourcegraph/scip-java](https://github.com/sourcegraph/scip-java) codebase.
[scip-code/scip-java](https://github.com/scip-code/scip-java) codebase.

## System dependencies

The recommended way to get a working development environment is via
[Nix](https://nixos.org/download) and the provided [flake](https://github.com/sourcegraph/scip-java/blob/main/flake.nix):
[Nix](https://nixos.org/download) and the provided [flake](flake.nix):

```sh
nix develop # default shell (JDK 17)
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Java and Kotlin indexer for [SCIP](https://github.com/scip-code/scip) ![](https://img.shields.io/badge/status-development-green?style=flat)

| Documentation | Link |
| -------------------- | ---------------------------------------------------------------------- |
| Landing page | https://sourcegraph.github.io/scip-java |
| Getting started | https://sourcegraph.github.io/scip-java/docs/getting-started.html |
| Manual configuration | https://sourcegraph.github.io/scip-java/docs/manual-configuration.html |
| Contributing | https://sourcegraph.github.io/scip-java/docs/contributing.html |
| Design | https://sourcegraph.github.io/scip-java/docs/design.html |
| Documentation | Link |
| -------------------- | ------------------------------------------------------ |
| Getting started | [docs/getting-started.md](docs/getting-started.md) |
| Manual configuration | [docs/manual-configuration.md](docs/manual-configuration.md) |
| Contributing | [CONTRIBUTING.md](CONTRIBUTING.md) |
| Design | [docs/design.md](docs/design.md) |
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sourcegraph.buildlogic
package org.scip_code.scip_java.buildlogic

import org.gradle.api.Project
import org.gradle.api.Task
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sourcegraph.buildlogic
package org.scip_code.scip_java.buildlogic

import java.io.File
import java.util.Properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sourcegraph.buildlogic
package org.scip_code.scip_java.buildlogic

import java.io.File
import org.gradle.api.Task
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sourcegraph.buildlogic
package org.scip_code.scip_java.buildlogic

import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
Expand Down
9 changes: 5 additions & 4 deletions build-logic/src/main/kotlin/scip.maven-publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

extensions.configure<MavenPublishBaseExtension>("mavenPublishing") {
val repositoryUrl = "https://github.com/sourcegraph/scip-java"
val repositoryUrl = "https://github.com/scip-code/scip-java"
publishToMavenCentral()
signAllPublications()

Expand All @@ -21,13 +21,14 @@ extensions.configure<MavenPublishBaseExtension>("mavenPublishing") {
}
developers {
developer {
id.set("sourcegraph")
name.set("Sourcegraph")
name.set("SCIP Maintainers")
organization.set("scip-code")
organizationUrl.set("https://github.com/scip-code")
}
}
scm {
connection.set("scm:git:$repositoryUrl.git")
developerConnection.set("scm:git:ssh://git@github.com/sourcegraph/scip-java.git")
developerConnection.set("scm:git:ssh://git@github.com/scip-code/scip-java.git")
url.set(repositoryUrl)
}
}
Expand Down
2 changes: 1 addition & 1 deletion build-logic/src/main/kotlin/scip.project-base.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group = "com.sourcegraph"
group = "org.scip-code"
version = providers.gradleProperty("releaseVersion").orElse("0.0.0-SNAPSHOT").get()

// Several modules also have Bazel `BUILD` files. On the default macOS
Expand Down
5 changes: 1 addition & 4 deletions docs/design.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
id: design
title: Design
---
# Design

This project is implemented as a
[Java compiler plugin](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.compiler/com/sun/source/util/Plugin.html)
Expand Down
Loading
Loading