Skip to content

Commit

Permalink
Fix to non-unity build
Browse files Browse the repository at this point in the history
  • Loading branch information
svermeulen committed May 15, 2016
1 parent b9c3051 commit 15df635
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public void TestMatchAll()
Assert.IsEqual(Container.ResolveAll<IFoo>().Count(), 4);
}

#if !NOT_UNITY3D
[Test]
public void TestDerivingFromFail()
{
Expand All @@ -48,6 +49,7 @@ public void TestDerivingFromFail()

Assert.That(Container.ResolveAll<IFoo>().IsEmpty());
}
#endif

[Test]
public void TestAttributeFilter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
<Compile Include="Conditions\TestConditionsTarget.cs" />
<Compile Include="Conditions\TestConditionsTargetInstance.cs" />
<Compile Include="Conditions\TestIdentifiers.cs" />
<Compile Include="Conventions\Foo.cs" />
<Compile Include="Conventions\TestConvention.cs" />
<Compile Include="Factories\Bindings\TestFactoryTo0.cs" />
<Compile Include="Factories\Bindings\TestFactoryToGetter0.cs" />
<Compile Include="Factories\Bindings\TestFactoryToInstance0.cs" />
Expand Down Expand Up @@ -114,7 +116,6 @@
<Compile Include="Other\TestValidateInstaller.cs" />
<Compile Include="Other\ZenjectProfileTest.cs" />
<Compile Include="Util\TestListComparer.cs" />
<Compile Include="Util\TestWithContainer.cs" />
<Compile Include="Other\TestInheritInSubContainers.cs" />
<Compile Include="Other\TestCircularDependencies.cs" />
<Compile Include="Other\TestConflictingToSingletonUses.cs" />
Expand All @@ -130,6 +131,9 @@
<Compile Include="Validation\TestValidate1.cs" />
<Compile Include="Validation\TestValidateFactories.cs" />
<Compile Include="BindFeatures\TestNonLazy.cs" />
<Compile Include="Factories\IFactory\TestIFactory.cs" />
<Compile Include="Conventions\FooMore.cs" />
<Compile Include="..\..\TestingFramework\Editor\ZenjectUnitTestFixture.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand All @@ -139,4 +143,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Linq;
using System.Reflection;
using ModestTree;
using UnityEngine;

namespace Zenject
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !NOT_UNITY3D

using System;
using System.Collections.Generic;
using ModestTree;
Expand Down Expand Up @@ -226,3 +228,5 @@ public Component Component
}
}
}

#endif
62 changes: 35 additions & 27 deletions UnityProject/Assets/Zenject/Source/Zenject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Internal\Assert.cs" />
<Compile Include="Internal\Func.cs" />
<Compile Include="Internal\LinqExtensions.cs" />
<Compile Include="Internal\Log.cs" />
<Compile Include="Internal\MiscExtensions.cs" />
<Compile Include="Internal\PreserveAttribute.cs" />
<Compile Include="Internal\ProfileBlock.cs" />
<Compile Include="Internal\ReflectionUtil.cs" />
<Compile Include="Internal\Tuple.cs" />
<Compile Include="Internal\TypeExtensions.cs" />
<Compile Include="Binding\Binders\ConcreteBinders\ConcreteIdBinderGeneric.cs" />
<Compile Include="Binding\Binders\ConcreteBinders\ConcreteIdBinderNonGeneric.cs" />
<Compile Include="Binding\Binders\Conventions\ConventionAssemblySelectionBinder.cs" />
<Compile Include="Binding\Binders\Conventions\ConventionBindInfo.cs" />
<Compile Include="Binding\Binders\Conventions\ConventionFilterTypesBinder.cs" />
<Compile Include="Binding\Binders\Conventions\ConventionSelectTypesBinder.cs" />
<Compile Include="Binding\Binders\IdScopeBinder.cs" />
<Compile Include="Binding\BindingUtil.cs" />
<Compile Include="Binding\Binders\ArgumentsBinder.cs" />
<Compile Include="Binding\Binders\ConditionBinder.cs" />
Expand All @@ -68,38 +85,29 @@
<Compile Include="Binding\Binders\ConcreteBinders\ConcreteBinderGeneric.cs" />
<Compile Include="Binding\Binders\ConcreteBinders\ConcreteBinderNonGeneric.cs" />
<Compile Include="Binding\Binders\FromBinders\FromBinder.cs" />
<Compile Include="Factories\PrefabFactory.cs" />
<Compile Include="Injection\InjectUtil.cs" />
<Compile Include="Install\CompositionRoot\CompositionRoot.cs" />
<Compile Include="Install\CompositionRoot\GameObjectCompositionRoot.cs" />
<Compile Include="Install\CompositionRoot\ProjectCompositionRoot.cs" />
<Compile Include="Install\CompositionRoot\SceneCompositionRoot.cs" />
<Compile Include="Install\CompositionRoot\SceneDecoratorCompositionRoot.cs" />
<Compile Include="Install\DecoratorInstaller.cs" />
<Compile Include="Install\MonoInstaller.cs" />
<Compile Include="Install\ScriptableObjectInstaller.cs" />
<Compile Include="Install\ZenjectBinding.cs" />
<Compile Include="Internal\Assert.cs" />
<Compile Include="Internal\Func.cs" />
<Compile Include="Internal\LinqExtensions.cs" />
<Compile Include="Internal\Log.cs" />
<Compile Include="Internal\MiscExtensions.cs" />
<Compile Include="Internal\PreserveAttribute.cs" />
<Compile Include="Internal\ProfileBlock.cs" />
<Compile Include="Internal\ReflectionUtil.cs" />
<Compile Include="Internal\Tuple.cs" />
<Compile Include="Internal\TypeExtensions.cs" />
<Compile Include="Runtime\Facades\ProjectFacade.cs" />
<Compile Include="Install\Contexts\Context.cs" />
<Compile Include="Install\Contexts\GameObjectContext.cs" />
<Compile Include="Install\Contexts\ProjectContext.cs" />
<Compile Include="Install\Contexts\SceneContext.cs" />
<Compile Include="Install\Contexts\SceneDecoratorContext.cs" />
<Compile Include="Install\Contexts\StaticContext.cs" />
<Compile Include="Install\InitialComponentsInjecter.cs" />
<Compile Include="Providers\ComponentProviders\GetFromPrefabComponentProvider.cs" />
<Compile Include="Providers\PrefabProviders\PrefabProvider.cs" />
<Compile Include="Providers\PrefabProviders\PrefabProviderResource.cs" />
<Compile Include="Runtime\Kernels\DefaultGameObjectKernel.cs" />
<Compile Include="Runtime\Kernels\Kernel.cs" />
<Compile Include="Runtime\Kernels\MonoKernel.cs" />
<Compile Include="Runtime\Kernels\ProjectKernel.cs" />
<Compile Include="Runtime\Kernels\SceneKernel.cs" />
<Compile Include="Usage\IInitializable.cs" />
<Compile Include="Usage\InjectAttribute.cs" />
<Compile Include="Usage\InjectAttributeBase.cs" />
<Compile Include="Usage\InjectLocalAttribute.cs" />
<Compile Include="Usage\InjectOptionalAttribute.cs" />
<Compile Include="Usage\InjectSources.cs" />
<Compile Include="Usage\ITickable.cs" />
<Compile Include="Usage\PostInjectAttribute.cs" />
<Compile Include="Usage\ZenjectAllowDuringValidationAttribute.cs" />
<Compile Include="Validation\IValidatable.cs" />
<Compile Include="Factories\KeyedFactory.cs" />
Expand All @@ -111,6 +119,7 @@
<Compile Include="Main\BindingId.cs" />
<Compile Include="Install\IInstaller.cs" />
<Compile Include="Install\Installer.cs" />
<Compile Include="Install\MonoInstaller.cs" />
<Compile Include="Runtime\DisposableManager.cs" />
<Compile Include="Runtime\InitializableManager.cs" />
<Compile Include="Injection\InjectContext.cs" />
Expand All @@ -121,10 +130,13 @@
<Compile Include="Providers\InstanceProvider.cs" />
<Compile Include="Providers\MethodProvider.cs" />
<Compile Include="Providers\Singleton\SingletonMarkRegistry.cs" />
<Compile Include="Install\DecoratorInstaller.cs" />
<Compile Include="Util\UnityUtil.cs" />
<Compile Include="Main\DiContainer.cs" />
<Compile Include="Factories\PrefabFactory.cs" />
<Compile Include="Util\ExecutionOrderInstaller.cs" />
<Compile Include="Util\ZenUtilInternal.cs" />
<Compile Include="Install\ZenjectBinding.cs" />
<Compile Include="Providers\ProviderUtil.cs" />
<Compile Include="Main\IBinder.cs" />
<Compile Include="Providers\IProvider.cs" />
Expand Down Expand Up @@ -167,9 +179,6 @@
<Compile Include="Factories\DynamicFactory.cs" />
<Compile Include="Providers\SubContainerCreators\SubContainerCreatorByPrefab.cs" />
<Compile Include="Providers\Singleton\SubContainer\SubContainerSingletonProviderCreatorByPrefab.cs" />
<Compile Include="Runtime\Facades\SceneFacade.cs" />
<Compile Include="Runtime\Facades\MonoFacade.cs" />
<Compile Include="Runtime\Facades\Facade.cs" />
<Compile Include="Providers\Singleton\SubContainer\SubContainerSingletonProviderCreatorByPrefabResource.cs" />
<Compile Include="Providers\PrefabProviders\IPrefabProvider.cs" />
<Compile Include="Binding\BindInfo\BindInfo.cs" />
Expand Down Expand Up @@ -201,12 +210,11 @@
<Compile Include="Providers\SubContainerCreators\SubContainerCreatorByPrefabWithParams.cs" />
<Compile Include="Binding\Binders\GameObject\GameObjectNameGroupNameScopeBinder.cs" />
<Compile Include="Binding\Binders\GameObject\GameObjectGroupNameScopeBinder.cs" />
<Compile Include="Runtime\Facades\DefaultGameObjectFacade.cs" />
<Compile Include="Install\ScriptableObjectInstaller.cs" />
<Compile Include="Util\ZenjectSceneLoader.cs" />
<Compile Include="Util\ValidationUtil.cs" />
<Compile Include="Validation\ValidationMarker.cs" />
<Compile Include="Binding\Binders\NonLazyBinder.cs" />
<Compile Include="Validation\ValidationSceneDisabler.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down

0 comments on commit 15df635

Please sign in to comment.