hap-java / HAP-Java

Java implementation of the HomeKit Accessory Protocol
MIT License
153 stars 82 forks source link

How to use 2.0.0 SNAPSHOT from Gradle? #135

Closed dfrommi closed 3 years ago

dfrommi commented 3 years ago

Sorry for the probably quite stupid question, but could someone please explain to me how to use HAP-Java 2.0.0-SNAPSHOT as a dependency in a Gradle project?

I think I might be missing the correct repo. I'm currently trying it with

    repositories {
        jcenter()
        mavenCentral()
        maven("https://oss.sonatype.org/content/repositories/snapshots")
    }

And dependency

dependencies {
    api("io.github.hap-java:hap:2.0.0-SNAPSHOT")
}

But I just get this:

   > Could not find io.github.hap-java:hap:2.0.0-SNAPSHOT.
     Searched in the following locations:
       - https://jcenter.bintray.com/io/github/hap-java/hap/2.0.0-SNAPSHOT/maven-metadata.xml
       - https://jcenter.bintray.com/io/github/hap-java/hap/2.0.0-SNAPSHOT/hap-2.0.0-SNAPSHOT.pom
       - https://repo.maven.apache.org/maven2/io/github/hap-java/hap/2.0.0-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/io/github/hap-java/hap/2.0.0-SNAPSHOT/hap-2.0.0-SNAPSHOT.pom
       - https://oss.sonatype.org/content/repositories/snapshots/io/github/hap-java/hap/2.0.0-SNAPSHOT/maven-metadata.xml
       - https://oss.sonatype.org/content/repositories/snapshots/io/github/hap-java/hap/2.0.0-SNAPSHOT/hap-2.0.0-SNAPSHOT.pom

Thanks a lot!

yfre commented 3 years ago

unfortunately, there are no builds or official releases of hap-java since almost 2 years now and dont think we will see any soon. probably we need to fork this project again

dfrommi commented 3 years ago

Thanks a lot for your response.

Based ob the Maven-example in the README, I was assuming that the snapshot should be available somewhere.

Then I'll have to stick with Jitpack for now.

Issue can be closed from my side.

andylintner commented 3 years ago

@ccutrer @timcharper - did either of you ever apply for the new maven coordinates with Sonatype? I used my personal key for the com.beowulfe package...

ccutrer commented 3 years ago

No

dfrommi commented 3 years ago

Just to summarize how Hap-Java can be used from Gradle via jitpack:

repositories {
    mavenCentral()
    maven("https://jitpack.io")
}

dependencies {
  implementation("com.github.HAP-Java:hap-java:45d9403")
}
dfrommi commented 3 years ago

Still hoping for a proper release, but till then, the workaround via Jitpack solved my issue.