commit 245930c50a3be5b1f7fcc65c32f39a49a868ca52 Author: Adrian Schröter Date: Mon Oct 14 14:22:29 2024 +0200 Sync from SUSE:ALP:Source:Standard:1.0 google-guice revision a3cd5ae704fb8a8f5e130652fb6c242e diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_service b/_service new file mode 100644 index 0000000..fd34ccd --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + git + https://github.com/google/guice.git + 5.1.0 + @PARENT_TAG@ + google-guice + + + *.tar + xz + + + diff --git a/google-guice-5.1.0.tar.xz b/google-guice-5.1.0.tar.xz new file mode 100644 index 0000000..9e61f1f --- /dev/null +++ b/google-guice-5.1.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fa10549f7cf3cb83e05f06cfad470cb21a60f98f0a8ed4b302c79835ba1d3e3 +size 446716 diff --git a/google-guice-build.tar.xz b/google-guice-build.tar.xz new file mode 100644 index 0000000..467201f --- /dev/null +++ b/google-guice-build.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38d9acb0f9712287e792507b68b5b75d4697f15039f10a5484f5e2c2c0fe354 +size 3812 diff --git a/google-guice.changes b/google-guice.changes new file mode 100644 index 0000000..39c40c1 --- /dev/null +++ b/google-guice.changes @@ -0,0 +1,119 @@ +------------------------------------------------------------------- +Wed May 3 11:27:41 UTC 2023 - Fridrich Strba + +- Upgrade to upstream version 5.1.0 + * Changes of 4.2: + + Java 9 and JPMS support + + Multibindings are now in the Guice core artifact. + The multibindings artifact is empty to prevent confusion + during upgrading and will be removed in a later release. + + Improve the performance of guice provisioning (by about 20%) + by changing the way errors are reported. Guice will no longer + report multiple errors during provisioning (Guice still + reports multiple errors during injector creation). + + Better error messages for a missing binding. + + Various optimizations. + + AbstractModule.configure() is non-abstract to allow modules + with only @Provides/@ProvidesIntoSet/... methods. + + Add a CheckedProviders class. + + Change the way Singletons work to not rely on ThreadLocals nor + WeakReferences. + + Add MapBinderBinding.getEntries(Iterable). + + Deprecate ProvisionListener.ProvisionInvocation + .getDependencyChain(). + + Ensure that Struts interceptors are populated even if they are + created after the injector (Fixes #1081, #1075). + + Add support for multibindings with annotations in the Guice + DaggerMethodScanner. + * Changes of 4.2.1 + + Java10 support (updated cglib & asm). + + Minor updates to the testlib extension. + * Changes of 4.2.2 + + Java11 support (updated cglib & asm) + * Changes of 4.2.3 + + Java14 support (updated asm). + + Added Injector.getElements API, to expose all Element SPI + types from the Injector. + + Added Injector.getAllMembersInjectorInjectionPoints API, + to expose injection points created by arbitrary members + injection. + + Added getAlternateKeys to Multibinder SPI types + (MultibinderBinding, MapBinderBinding, OptionalBinderBinding), + to explicitly list the other keys these bindings are + available as. + + Scan for (and bind) @Provides-like methods in a consistent + ordering, rather than relying on the non-deterministic + Class.getDeclaredMembers ordering. + + Update DaggerAdapter to work with newer dagger code. + + Fixed a subtle bug with eager singleton evaluation. + + Updated @RequestScope's scope annotation to the JSR330 @Scope, + so it can be reused by non-Guice DI systems. + + Clarified the error message when an injectable constructor is + missing. + + Add deprecated overloads to various Modules methods, to make + it clearer when calling them is unnecessary. + + Added factory methods to Modules for common Binder + configuration methods, to make it easier to configure them. + * Changes of 5.0.1: + + Added Java15 support (updated asm and bug fixes). + + Removed cglib as a core dependency. (#1359) + + Improved error messages. + + Improved support for using Guice with Kotlin. + + Added a mechanism to restrict who can bind types or + annotations, to allow library authors to control their + bindings. + + Removed no-aop build variant. + + Fixed 'illegal reflective access' warnings. + * Changes of 5.1.0: + + This minor release adds support for Java 17. +- Removed patches: + * google-guice-throwingproviderbinder.patch + * guice-4.1-disabledextensions.patch + * guice-4.1-fixup-ant.patch + * guice-4.1-javadoc.patch +- Fetch sources using source service, which allows us to clean up + the tarball if needed +- Generate the ant build system using the maven pom files. + +------------------------------------------------------------------- +Wed Apr 27 11:52:34 UTC 2022 - Fridrich Strba + +- Avoid using xmvn-resolve and xmvn-install in order to avoid + build cycles with new dependencies in dependent packages +- Build only the NO_AOP version of the guice.jar and alias + accordingly so that it provides both + +------------------------------------------------------------------- +Thu Jun 10 10:16:03 UTC 2021 - Fridrich Strba + +- Modified patches: + * google-guice-throwingproviderbinder.patch + + do not add the override of virtual function + + build with source/target 8 so that the default override + from the interface can be used + * guice-4.1-javadoc.patch + + build javadoc with source level 8 + +------------------------------------------------------------------- +Tue May 11 12:46:28 UTC 2021 - Fridrich Strba + +- Do not build against the compatibility guava20 +- Added patch: + * google-guice-throwingproviderbinder.patch + + fix a little glitch with default generic function in guava + +------------------------------------------------------------------- +Wed Apr 3 07:41:22 UTC 2019 - Fridrich Strba + +- Clean the tarball in order to avoid files with spurious legal + status + +------------------------------------------------------------------- +Wed Mar 27 09:31:25 UTC 2019 - Jan Engelhardt + +- Trim bias from description. + +------------------------------------------------------------------- +Wed Mar 27 06:40:01 UTC 2019 - Fridrich Strba + +- Initial packaging of google-guice 4.1 diff --git a/google-guice.spec b/google-guice.spec new file mode 100644 index 0000000..b14a18f --- /dev/null +++ b/google-guice.spec @@ -0,0 +1,278 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global short_name guice +Name: google-%{short_name} +Version: 5.1.0 +Release: 0 +Summary: Dependency injection framework for Java 5 and above +License: Apache-2.0 +Group: Development/Libraries/Java +URL: https://github.com/google/%{short_name} +# ./create-tarball.sh %%{version} +Source0: %{name}-%{version}.tar.xz +Source1: %{name}-build.tar.xz +BuildRequires: ant +BuildRequires: aopalliance +BuildRequires: atinject +BuildRequires: fdupes +BuildRequires: glassfish-servlet-api +BuildRequires: google-errorprone-annotations +BuildRequires: guava +BuildRequires: java-devel >= 1.8 +BuildRequires: javapackages-local +BuildRequires: jsr-305 +BuildRequires: objectweb-asm +Provides: %{short_name}-multibindings = %{version} +Obsoletes: %{short_name}-multibindings < %{version} +Obsoletes: %{short_name}-testlibs +BuildArch: noarch + +%description +Guice alleviates the need for factories and the use of "new" in Java +code. Guice's @Inject is a different "new". Writing factories will +still be needed in some cases, but code will not directly depend on +them. + +Guice embraces Java's type safe nature, especially when it comes to +features introduced in Java 5 such as generics and annotations. + +%package -n %{short_name}-parent +Summary: Guice parent POM +Group: Development/Libraries/Java + +%description -n %{short_name}-parent +Guice is a dependency injection framework for Java 5 +and above. This package provides parent POM for Guice modules. + +%package -n %{short_name}-assistedinject +Summary: AssistedInject extension module for Guice +Group: Development/Libraries/Java + +%description -n %{short_name}-assistedinject +Guice is a dependency injection framework for Java 5 +and above. This package provides AssistedInject module for Guice. + +%package -n %{short_name}-extensions +Summary: Extensions for Guice +Group: Development/Libraries/Java + +%description -n %{short_name}-extensions +Guice is a dependency injection framework for Java 5 +and above. This package provides extensions POM for Guice. + +%package -n %{short_name}-grapher +Summary: Grapher extension module for Guice +Group: Development/Libraries/Java + +%description -n %{short_name}-grapher +Guice is a dependency injection framework for Java 5 +and above. This package provides Grapher module for Guice. + +%package -n %{short_name}-jmx +Summary: JMX extension module for Guice +Group: Development/Libraries/Java + +%description -n %{short_name}-jmx +Guice is a dependency injection framework for Java 5 +and above. This package provides JMX module for Guice. + +%package -n %{short_name}-jndi +Summary: JNDI extension module for Guice +Group: Development/Libraries/Java + +%description -n %{short_name}-jndi +Guice is a dependency injection framework for Java 5 +and above. This package provides JNDI module for Guice. + +%package -n %{short_name}-servlet +Summary: Servlet extension module for Guice +Group: Development/Libraries/Java + +%description -n %{short_name}-servlet +Guice is a dependency injection framework for Java 5 +and above. This package provides Servlet module for Guice. + +%package -n %{short_name}-throwingproviders +Summary: ThrowingProviders extension module for Guice +Group: Development/Libraries/Java + +%description -n %{short_name}-throwingproviders +Guice is a dependency injection framework for Java 5 +and above. This package provides ThrowingProviders module for Guice. + +%package -n %{short_name}-bom +Summary: Bill of Materials for Guice +Group: Development/Libraries/Java + +%description -n %{short_name}-bom +Guice is a dependency injection framework for Java 5 +and above. This package provides Bill of Materials module for Guice. + +%package javadoc +Summary: API documentation for Guice +Group: Documentation/HTML + +%description javadoc +This package provides %{summary}. + +%prep +%setup -q -a1 + +# We don't have struts2. +%pom_disable_module struts2 extensions +# Android-specific extension +%pom_disable_module dagger-adapter extensions + +# Remove additional build profiles, which we don't use anyways +# and which are only pulling additional dependencies. +%pom_xpath_remove "pom:profile[pom:id='guice.with.jarjar']" core + +# Fix OSGi metadata due to not using jarjar +%pom_xpath_set "pom:instructions/pom:Import-Package" \ + "!com.google.inject.*,*" core + +# Animal sniffer is only causing problems. Disable it for now. +%pom_remove_plugin :animal-sniffer-maven-plugin core +%pom_remove_plugin :animal-sniffer-maven-plugin extensions + +%pom_remove_plugin :maven-gpg-plugin + +# We don't have the custom doclet used by upstream. Remove +# maven-javadoc-plugin to generate javadocs with default style. +%pom_remove_plugin -r :maven-javadoc-plugin + +# remove test dependency to make sure we don't produce requires +# see #1007498 +%pom_remove_dep :guava-testlib extensions +%pom_xpath_remove "pom:dependency[pom:classifier='tests']" extensions + +%pom_remove_parent + +%pom_disable_module persist extensions +%pom_disable_module spring extensions +%pom_disable_module testlib extensions + +%pom_change_dep -r -f ::::: ::::: + +%pom_remove_parent core +%pom_xpath_inject pom:project " + com.google.inject + %{version}" core + +for mdl in assistedinject dagger-adapter grapher jmx jndi persist servlet spring struts2 testlib throwingproviders; do + %pom_remove_parent extensions/${mdl} + %pom_xpath_inject pom:project " + com.google.inject.extensions + %{version}" extensions/${mdl} +done + +%build +mkdir -p lib +build-jar-repository -s lib \ + aopalliance \ + atinject \ + glassfish-servlet-api \ + google-errorprone/annotations \ + guava/guava \ + jsr-305 \ + objectweb-asm/asm \ + +%{ant} -Dtest.skip=true package javadoc + +%install +# jars +install -dm 0755 %{buildroot}%{_javadir}/%{short_name} +install -pm 0644 core/target/guice-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}.jar +# Provide symlinks for all jars that existed, no_aop and aop +ln -sf %{short_name}/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar +ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}-no_aop.jar +ln -sf %{short_name}/%{name}.jar %{buildroot}%{_javadir}/%{name}-no_aop.jar + +install -pm 0644 extensions/jmx/target/guice-jmx-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-jmx.jar +install -pm 0644 extensions/assistedinject/target/guice-assistedinject-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-assistedinject.jar +install -pm 0644 extensions/throwingproviders/target/guice-throwingproviders-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-throwingproviders.jar +install -pm 0644 extensions/servlet/target/guice-servlet-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-servlet.jar +install -pm 0644 extensions/jndi/target/guice-jndi-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-jndi.jar +install -pm 0644 extensions/grapher/target/guice-grapher-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-grapher.jar + +# poms +install -dm 0755 %{buildroot}%{_mavenpomdir}/%{short_name} +install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-parent.pom +%add_maven_depmap %{short_name}/guice-parent.pom -f parent +install -pm 0644 bom/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-bom.pom +%add_maven_depmap %{short_name}/guice-bom.pom -f bom +install -pm 0644 extensions/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/extensions-parent.pom +%add_maven_depmap %{short_name}/extensions-parent.pom -a org.sonatype.sisu.inject:extensions-parent -f extensions + +install -pm 0644 core/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/%{name}.pom +%add_maven_depmap %{short_name}/%{name}.pom %{short_name}/%{name}.jar -a "org.sonatype.sisu:sisu-guice,com.google.inject:guice::no_aop:,org.sonatype.sisu:sisu-guice::no_aop:" + +install -pm 0644 extensions/jmx/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-jmx.pom +%add_maven_depmap %{short_name}/guice-jmx.pom %{short_name}/guice-jmx.jar -a org.sonatype.sisu.inject:guice-jmx -f jmx +install -pm 0644 extensions/assistedinject/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-assistedinject.pom +%add_maven_depmap %{short_name}/guice-assistedinject.pom %{short_name}/guice-assistedinject.jar -a org.sonatype.sisu.inject:guice-assistedinject -f assistedinject +install -pm 0644 extensions/throwingproviders/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-throwingproviders.pom +%add_maven_depmap %{short_name}/guice-throwingproviders.pom %{short_name}/guice-throwingproviders.jar -a org.sonatype.sisu.inject:guice-throwingproviders -f throwingproviders +install -pm 0644 extensions/servlet/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-servlet.pom +%add_maven_depmap %{short_name}/guice-servlet.pom %{short_name}/guice-servlet.jar -a org.sonatype.sisu.inject:guice-servlet -f servlet +install -pm 0644 extensions/jndi/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-jndi.pom +%add_maven_depmap %{short_name}/guice-jndi.pom %{short_name}/guice-jndi.jar -a org.sonatype.sisu.inject:guice-jndi -f jndi +install -pm 0644 extensions/grapher/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-grapher.pom +%add_maven_depmap %{short_name}/guice-grapher.pom %{short_name}/guice-grapher.jar -a org.sonatype.sisu.inject:guice-grapher -f grapher + +# javadoc +install -dm 0755 %{buildroot}%{_javadocdir}/%{name} +cp -pr core/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%dir %{_javadir}/%{short_name} +%{_javadir}/%{name}*.jar +%{_javadir}/%{short_name}/*-no_aop.jar + +%files -n %{short_name}-parent -f .mfiles-parent +%license COPYING + +%files -n %{short_name}-assistedinject -f .mfiles-assistedinject + +%files -n %{short_name}-extensions -f .mfiles-extensions + +%files -n %{short_name}-grapher -f .mfiles-grapher + +%files -n %{short_name}-jmx -f .mfiles-jmx + +%files -n %{short_name}-jndi -f .mfiles-jndi + +%files -n %{short_name}-servlet -f .mfiles-servlet + +%files -n %{short_name}-throwingproviders -f .mfiles-throwingproviders + +%files -n %{short_name}-bom -f .mfiles-bom + +%files javadoc +%{_javadocdir}/%{name} +%license COPYING + +%changelog